This is a Java servlet filter (as per Servlet API 2.3). This filter checks referrer field in the source request, parses its parameters and saves them as a HashMap in the request scope. This filter lets you obtain the search words when a client comes to your site from a search engine query.
How to use it:
a) download refparamflt.jar and save it in WEB-INF/lib
b) describe this filter in web.xml:
c) describe a mapping for this filter in web.xml
in this case filter will be on for the each .jsp file. So in your JSP file
the code:
(HashMap)request.getAttribute("RefererParameters")
will return a HashMap with parameters in referrer field for your request.
For downloading:
Referer parameters filter: refparamflt.jar
See also JSOS - the largest collection of servlets and filters.