• Post Reply Bookmark Topic Watch Topic
  • New Topic

Filter is called twice when <dispatcher>REQUEST</dispatcher>  RSS feed

 
Himai Minh
Ranch Hand
Posts: 1522
9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have a filter :






I noticed this filter is called twice, one for the request from the client, another for the forward.
But I think when the page is forwarded from the DownloadServlet to the url, the filter should not be called as the dispatcher is defined as REQUEST.

Here is the output:

 
Himai Minh
Ranch Hand
Posts: 1522
9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I can answer my own question.
When I click on the url that deletes the cookie, the DownloadServlet forwards to the /delete_cookies.jsp.
The filter is not called.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!