This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Svelte and Sapper in Action and have Mark Volkmann on-line!
See this thread for details.
Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Doubts in servlet filters.

 
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all
am using the servlet filter for the first time. I
have got some doubt in its usage.
What is the use of
chain.doFilter(request, response);
inside the doFilter method. If am commenting out that
line my servlet is not working and it also does not
throw any exception in the console.
When will the filter init() and filter destroy()
method calls. My sample program does not calls the
above methods.
 
Ranch Hand
Posts: 176
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Sriram,
Please follow the link given below.
http://www.javaworld.com/javaworld/jw-06-2001/jw-0622-filters.html
Hope it helps.
Ravi
 
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
filters are like layers sitting between
client and the actual servlet.
it is used for performing some actions
on the request from client and response to the
client.
you can use it for logging xml transformations
stuff like that.
number of layers i said earlier is equivalent to number of filters.
it can either act on request or response or both.
normally n number of filters can be mapped to one or more servlets.and this is configured in config file
rgds
muthu
 
Arch enemy? I mean, I don't like you, but I don't think you qualify as "arch enemy". Here, try this tiny ad:
the value of filler advertising in 2020
https://coderanch.com/t/730886/filler-advertising
    Bookmark Topic Watch Topic
  • New Topic