Two Laptop Bag*
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
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 31079
    
163

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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: What is the motivation to use filters in a struts application