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

What is the motivation to use filters in a struts application  RSS feed

 
Sudarshan Sreenivasan
Ranch Hand
Posts: 188
IntelliJ IDE Java MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am new to struts & from my limited understanding i guess that all my requests would pass through the action servlet(Controller) in the case all my authentication code can be placed here .

Assuming my motivation to create a filter is to implement security , cannot my action servlet just do that job ?

Thanks in advance
 
Jeanne Boyarsky
author & internet detective
Sheriff
Posts: 36406
454
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
An action servlet can do it. So can a filter or a request dispatcher. note that a filter can be reused if you have more than one servlet or application.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!