Default attributes filter ver. 1.2

This is a Java servlet filter (as per Servlet API 2.3). This filter lets you define the default attributes for the request scope.

How to use it:

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

b) describe this filter in web.xml. Initial parameters must describe your default attributes. For example:


c) describe a mapping for this filter in web.xml


and now your request will have the above mentioned default attributes intAttribute and strAttribute.

Also you can describe values for your parameters in the following form:




in this case filter will lookup some_name attribute in the appropriate scope (application or session) and use its value.

   For downloading:

    Default attributes filter:  defattrflt.jar

 ©  Coldbeans     Comments?

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

Also in JSOS: