This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

override actionservlet

 
A Babu
Ranch Hand
Posts: 114
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all,
can we override the actionservlet.

that mean i am not interested to use the funtionality of the actionservlet which is come with struts framework.

i want to write my own functionality what actionservlet actually do.

is it possible..

cheers,
babu.
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The authors of Struts anticipated that users might want to do things a little differently, so they wrote the components (ActionServlet, RequestProcessor, etc.) with extensibility in mind. So, the answer is yes, you can override the ActionServlet.

To do so, just write a class that extends ActionServlet and then put your class as the <servlet-class> in the action servlet definition in the web.xml file.

Maybe it's just a language thing, but the way you worded your question, it sounded like you don't want to use any of the existing functionality of the action servlet. If that's the case, why use Struts at all? Just write your own framework. If you just want to modify a few minor things about the way Struts handles things, then you're on the right track by extending ActionServlet.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic