File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
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
internet detective
Marshal

Joined: May 26, 2003
Posts: 30370
    
150

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.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: What is the motivation to use filters in a struts application