Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

"After" filter?  RSS feed

 
Panda Mima
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello!

I have a servlet which gets request, processes and gives some specific output as response. I had to pre-parse request information for this servlet, so I've created filter (doFilter(...)). The problem now is that I need I need to be able to modify servlet's output too, but I cannot modify servlet.
It provides some text information, but I need to apply some kind of "after-filter" to it to change it specific way.

Is there are any "after" filter in J2EE?

Usual filter from what I understand helps to change/work with request _before_ servlet will get into it, but what if I need to do something right _after_ servlet?

Please help!
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65824
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is no concept of a "before" or "after" filter. You control when, in your filter, the rest of the filter chain gets called. So what happens before/after is entirely up to you.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!