• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

override actionservlet

 
Ranch Hand
Posts: 114
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
reply
    Bookmark Topic Watch Topic
  • New Topic