SEARCH
0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Prev | Current Page 260 | Next

Larry Brown, Marty Hall, and Yaakov Chaikin

"Core Servlets and JavaServer Pages, Volume 2"

apache.catalina.core.ApplicationContext
log
INFO: 127.0.0.1 tried to access http://localhost/filtersrus/SecurityHole
on Fri Apr 14 15:22:25 EDT 2006. (Reported by Logger.)
Apr 14, 2006 3:22:30 PM org.apache.catalina.core.ApplicationContext
log
INFO: 127.0.0.1 tried to access http://localhost/filtersrus/TodaysSpecial
on Fri Apr 14 15:22:30 EDT 2006. (Reported by Logger.)
Apr 14, 2006 3:22:32 PM org.apache.catalina.core.ApplicationContext
log
INFO: 127.0.0.1 tried to access http://localhost/filtersrus/TodaysSpecial
on Fri Apr 14 15:22:32 EDT 2006. (Reported by Logger.)
...
Listing 5.9
Partial contents of localhost.2006-04-14.log on
Tomcat (continued)
Chapter 5 ?–  Servlet and JSP Filters 222
If these capabilities are useful for servlets and JSP pages, you would expect them
to also be useful for the filters that apply to servlets and JSP pages. Indeed they are.
However, because filters execute before the servlets or JSP pages to which they are
attached, it is not normally possible for end users to customize filter behavior. Nevertheless,
it is still useful to permit deployers (not just developers) to customize filter
behavior by providing initialization parameters. This behavior is accomplished with
the following steps.
1. Define initialization parameters. Use the init-param subelement
of filter in web.xml along with param-name and
param-value subelements, as follows:

SomeFilter
somePackage.


Pages:
248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272