A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Badass: Making Users Awesome
this week in the
Joined: Feb 16, 2005
Oct 11, 2005 23:54:00
while i am working with FILTERS in
1) Is it compulsary to have a
when working with filter and
2) if i want to call a specific servlet using filters then how should we proceed.
please explain me with an example if possible along with deployment descriptor
Scheepers de Bruin
Joined: Jul 19, 2005
Oct 12, 2005 00:32:00
No it's not mandatory to have a servlet in order to use a filter.
Say we have a filter:
This will filter ALL requests received, irrespective of the resource requested. Images, pages, stylesheets, the works.
I'm not entirely sure what you ment by calling a servlet using a filter, but I suspect you either want to redirect to the servlet url, or request a servlet resource while processing a user request.
public void doFilter(
2) Requesting a servlet:
url = new
myStream = url.openStream();
//Code to read
' response from the myStream
We're doomed!!<br />Yay!!!<br />No that's bad Girr!!<br />Yay!!!
I agree. Here's the link:
filtering a request
Render my web page in pdf instead that hmtl
Filter Mapping Problem
redirect to error page upon session timedout
Optimizing Session tracking code.
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015