How can I make own ActionServlet? with example

Answer Posted / shaik baji

1)ActionServlet contains a set of methods which are invoked
by the container for processing the client request. If we
want to define our own ActionServlet then you
should "extends" our class
from "org.apache.struts.action.ActionServlet" class and
what ever the functionality we want to override of the
ActionServlet we should override that respective predefined
ActionServlet methods.

2)To invoke our own ActionServlet class instead of the
predefined ActionServlet class we should specify our own
ActionServlet class name in In "web.xml" file like as
follows:

<servlet-class>MyOwnActionServlet</servlet-class>

3)Then the container will invoke our own ActionServlet class

Is This Answer Correct ?    4 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is action class?

583


Explain about tiles?

577


Explain about the tag?

629


how to debug struts project in netbean ?

1923


How the flow of various requests happens in struts application?

536






What is declarative exception handling in struts?

560


How to override the default error message that can come during file uploading process?

578


How nested beans can be used in Struts applications?

552


How properties of a form are validated in Struts?

569


Is struts efficient?

496


What is a custom tag?

547


How to get data from the velocity page in a action class?

568


What is the struts in java?

512


What is ognl?

600


What are Struts2 core components?

566