This is a Java servlet filter (as per Servlet API 2.3). This filter lets you accumulate referrers for sites your visitors are coming from. Later you will be able to use a special JSP custom taglib for access to this information right in your JSP pages. How to use it: a) download refflt.jar and save it in WEB-INF/lib b) describe this filter in web.xml. Parameters are: counter describes a counter: how many last records will be collected.
Default value is 20.
<filter> <filter-name>RefererFilter</filter-name> <filter-class>com.cj.refer.RefererFilter</filter-class> <init-param> <param-name>counter</param-name> <param-value>20</param-value> </init-param> </filter> c) describe a mapping for this filter in web.xml
<filter-mapping> <filter-name>RefererFilter</filter-name> <url-pattern>*.jsp</url-pattern> </filter-mapping> in this case filter will be on for the each .jsp file. Filter accumulates data once per session. You can use Referer filter taglib for getting info about the sites your visitors are coming from in your JSP pages. For downloading: Referer filter: refflt.jar See also JSOS - the largest collection of servlets and filters.
|
Also in JSOS:
|