Can we override the ActionServlet?

Answers were Sorted based on User's Feedback



Can we override the ActionServlet?..

Answer / sr

we can not override an actionservlet because it is a class .

but we can sub class the actionservlet and we can have our
own request processor class.The above code is useful for
incuding request processor class.

Is This Answer Correct ?    18 Yes 2 No

Can we override the ActionServlet?..

Answer / sujit

The above ans is incorrect so the correct code to be
written in struts-config.xml is
<controller
processorClass="org.abc.comp.ExtendedRequestProcessorClass"/
>

Is This Answer Correct ?    8 Yes 3 No

Can we override the ActionServlet?..

Answer / vivek dubey

Yes we can modify the functionality of Action Servlet.
to do this we have to extend the RequestProcessor class and
overwrite the processPreprocess method.
and then add following tag in Struts-config.xml
<processor
className="org.abc.comp.ExtendedRequestProcessorClass"/>

Is This Answer Correct ?    0 Yes 8 No

Post New Answer

More Servlets Interview Questions

why are extending GenericServlet and why are extending HttpServlet explain?

7 Answers  


What is the requirement of servlet config and servlet context implemented and how are they implemented?

0 Answers  


If we disable cookies in our web page, what will happen?

6 Answers   Zensar,


what is servlet and what you get when we use servlets?

7 Answers   GGK Tech, Satyam,


Some examples where generic servlet is used?

1 Answers  






What is Request Dispatcher?

1 Answers  


When servlet object is created?

0 Answers  


What do you mean by filter in servlet?

0 Answers  


What is the difference between the include() and forward() methods?

0 Answers  


What type of protocols are used in HttpServlet?

3 Answers  


What are the advantages of Servlet over CGI?

0 Answers  


How variables can be accessed across the sessions?

3 Answers  


Categories