aspose file tools
The moose likes Servlets and the fly likes Filters and Action Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of Practical Unit Testing with TestNG and Mockito this week in the Testing forum!
JavaRanch » Java Forums » Java » Servlets
Reply Bookmark "Filters and Action" Watch "Filters and Action" New topic
Author

Filters and Action

Abhilash Alakkal
Greenhorn

Joined: Mar 01, 2007
Posts: 2
Can a filter ( Servlet Filter ) extend an Action class ( Struts) ??
If no, which standards are violated ??

Thanks,
Abhi.
Bosun Bello
Ranch Hand

Joined: Nov 06, 2000
Posts: 1503
No. A filter canot extend a struts Action Class. Your filter needs to implement the Filter interface. You may want to read up on filters to get more information.


Bosun (SCJP, SCWCD)
So much trouble in the world -- Bob Marley
Joan Horta Tosas
Ranch Hand

Joined: Feb 01, 2007
Posts: 59
Well, actually your filter class can extend what you want, as long as it implements the Filter interface... Another thing is that it would be a bad design, because you won't get any functionality that would have a Struts Action class because it will be called (the Filter functions) before requests being passed to Struts and after they get back to the client's browser... So you better not mix things in a class that are unrelated.
Abhilash Alakkal
Greenhorn

Joined: Mar 01, 2007
Posts: 2
Thanks for the info ppl
 
 
subject: Filters and Action
 
Threads others viewed
I want to filter some javaranch pages for reading?
request dispatcher forward to struts 2 action
Logging while clicking on link
Struts2 with Displaytag export option is not working
WA #1.....word association
WebSphere development made easy
without the weight of IBM tools
http://www.myeclipseide.com

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture