jQuery in Action, 2nd edition
The moose likes Servlets and the fly likes Filters and Action Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


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: 1496
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
 
developer file tools