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

Explain the complete struts validator framework.

739


What is struts actionmapping?

692


Whats the difference between the default namespace and the root namespace?

714


What is actioninvocation?

710


How is a lookup dispatch action created?

740


What is the purpose of @conversionerrorfieldvalidator annotation?

847


What is the difference in using Action interface and ActionSupport class for our action classes, which one you would prefer?

781


What is the purpose of @stringlengthfieldvalidator annotation?

804


What are the two scope types for formbeans?

849


How can we integrate log4j in Struts2 application?

763


What do you mean by dynaactionform?

707


Can you explain aware interfaces in struts2?

769


Which design pattern the interceptors in struts2 is based on?

697


What are the advantages of spring mvc over struts mvc?

657


In how many ways duplicate form submission can occurs?

759