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 are the main classes which are used in struts application?

499


What are action errors and error and what are the consequences they impose?

565


What is the use of reset method of ActionForm class?

570


What is the purpose of struts.xml in struct2?

679


What is apache struts cve 2017 5638?

545






What configuration changes are required to use resource files in Struts?

570


What are the 5 constants of action interface?

543


Describe validate() and reset() methods.

604


Explain the components of struts?

542


Explain the difference between plain-validator and field-validator in struts?

526


Why are frameworks used?

534


Why do we need mapdispatchtoprops?

476


Can you give an overview of how a struts application flows?

527


What are the struts2 configuration properties that control file uploading process?

604


What is strut action mapping?

513