• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Filters in servlet 2.3

 
Ranch Hand
Posts: 95
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Filters in servlet api 2.3 performs pre-processing or post-processing task prior or after the associated servlet is invoked.
so the filter is positioned between the client and the servlet. If its a post-procesing filter( for eg XSL formatting etc ), it also gets invoked prior to the servlet invocation but does nothing since the code in doFilter method is just meant for tweaking the output.
Does this mean that the programmer should take care that the doFilter method code should not cause any issue while the filter acts on the incoming request ?
And doesnt this cause unnecessary filter invocation during incoming request while its only needed during outcoming response. Doesnt this cause a performance issue?
If this is how it works and i understand correctly, then there are two issues,
1) coder has to take precaution in the doFilter method.
2) performance issues due to unnecessary invocation of filter.
And if a filter is meant only for pre-processing or post-processing, why doesnt the deployment descriptor give an indicator so that the container can take care of the rest and avoid the above drawbacks.
Let me know if anyone have come across this or my interpretation is incorrect.
 
Ranch Hand
Posts: 147
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hmmm, Good question Roger, I'm now also waiting to see someone's response here.
[ May 03, 2002: Message edited by: Sam Cala ]
 
I got this tall by not having enough crisco in my diet as a kid. This ad looks like it had plenty of shortening:
New web page for Paul's Rocket Mass Heaters movies
https://coderanch.com/t/785239/web-page-Paul-Rocket-Mass
reply
    Bookmark Topic Watch Topic
  • New Topic