This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Struts and the fly likes can we extend ActionServlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "can we extend ActionServlet" Watch "can we extend ActionServlet" New topic

can we extend ActionServlet

padmaratna kamble

Joined: Apr 26, 2006
Posts: 26
Hello friends..........
please tell me
how we can extends ActionServlet.
if yex give me example
if no
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
Yes, you can extend ActionServlet. If you do extend it, all you'd have to do is put the name of your subclass of ActionServlet in the web.xml file instead of ActionServlet.

However, once you study the Struts source code you will find that ActionServlet doesn't really do much. The bulk of the work is done by RequestProcessor. If you want to change how Struts works, you'll most likely want to extend RequestProcessor rather than ActionServlet.

If you extend request processor, just put the following entry in your struts-config.xml file:

<controller processorClass="com.mycompany.MySubclassOfRequestProcessor">

Consultant, Sima Solutions
Don't get me started about those stupid light bulbs.
subject: can we extend ActionServlet
Similar Threads
overriding ActionServlet in struts
how to override action servlet in struts
action servlet in struts
struts question
Struts drawbacks