Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Filters and Action  RSS feed

 
Abhilash Alakkal
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can a filter ( Servlet Filter ) extend an Action class ( Struts) ??
If no, which standards are violated ??

Thanks,
Abhi.
 
Bosun Bello
Ranch Hand
Posts: 1511
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Joan Horta Tosas
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the info ppl
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!