VOTG
[Logo] JavaRanch » Big Moose Saloon
  Search | FAQ | Recent Topics | Hot Topics
Register / Login


Reply Bookmark it! Watch this topic JavaRanch » Forums » Java » Servlets
 
RSS feed
 
New topic
Author

Filters and Action

Abhilash Alakkal
Greenhorn

Joined: Mar 01, 2007
Messages: 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
Messages: 1422

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
Messages: 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
Messages: 2

Thanks for the info ppl
 
 
 
Reply Bookmark it! Watch this topic JavaRanch » Forums » Java » Servlets
 
RSS feed
 
New topic
JProfiler
Get rid of your performance problems and memory leaks!