Destroy filter ver. 1.2


This is a Java servlet filter (as per Servlet API 2.3). This filter lets visitors access to files in your web application only once. During the first request the file will be served to the client and destroyed. The typical use cases are secure communications or content delivery applications.

How to use it:

a) download destroyflt.jar and save it in WEB-INF/lib

b) describe this filter in web.xml.
 


<filter>
  <filter-name>DestroyFilter</filter-name>
  <filter-class>com.cj.destroy.DestroyFilter</filter-class>
</filter>

d) describe a mapping for this filter in web.xml. E.g.:
 


<filter-mapping>
  <filter-name>DestroyFilter</filter-name>
  <url-pattern>/tmp/*.htm</url-pattern>
</filter-mapping>

in this example filter will be on for the each .htm file in /tmp subdirectory. It means that for files from this directory only one time access is allowed.

   For downloading:

    Destroy package:  destroyflt.jar
 

 ©  Coldbeans     Comments?

See also JSOS - the largest collection of servlets and filters.


     

Also in JSOS: