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

Can we have multiple struts config files in a single web app?

583


What is container struts2?

630


What is the purpose of form-beans tag in struct-config.xml?

631


What are the main classes which are used in struts application?

581


Give an example where struts tiles may be used?

644






Can you explain custom tag?

667


Are interceptors thread safe?

664


What are the action classes in struts?

609


Briefly tell the two kinds of form beans.

644


How tag libraries are defined in Struts?

678


At the point, you should go for struts framework?

624


Can we have multiple struts config files ?

604


Can you explain struts.properties in struts2?

618


What is front controller in struts?

656


What is s token?

617