Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

filters

 
sharmi mekala
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
when a servlet forwards a request(rd.forward("another servlet")) to "another servlet" and if a filter bypasses the request(request from first servlet to another servlet) and if the filter sets a new request attribute before calling chain.doFilter() why is the new request attribute not visible to "another servlet"
[ September 09, 2008: Message edited by: sharmi mekala ]
 
Eurig Jones
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
FirstServlet: A servlet mapped to /First and rd.forward("/Second");
SecondServlet: A servlet mapped to /Second
MyFilter: A Filter mapped to /First

If i use setAttribute() on the request inthe filter, that attribute is available in both FirstServlet and SecondServlet.

I'm not sure why you're getting a different result.
 
Deepak Jain
Ranch Hand
Posts: 637
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Would be nice if you can post some code and elaborate more.
Thanks
Deepak
Target SCWCD
SCJP 1.5
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic