This week's book giveaway is in the Design forum.
We're giving away four copies of Building Microservices and have Sam Newman on-line!
See this thread for details.
The moose likes Struts and the fly likes What is the motivation to use filters in a struts application Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Building Microservices this week in the Design forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "What is the motivation to use filters in a struts application" Watch "What is the motivation to use filters in a struts application" New topic
Author

What is the motivation to use filters in a struts application

Sudarshan Sreenivasan
Ranch Hand

Joined: Jun 28, 2007
Posts: 188

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
Marshal

Joined: May 26, 2003
Posts: 32507
    
214

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.


[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
 
Have you checked out Aspose?
 
subject: What is the motivation to use filters in a struts application
 
It's not a secret anymore!