How can we get Servlet API Request, Response, HttpSession etc Objects in action classes?



How can we get Servlet API Request, Response, HttpSession etc Objects in action classes?..

Answer / Naresh Kumar

In Struts2, you can obtain Servlet API objects through Action Support Superclass, by using the getServletRequest(), getServletResponse(), and getHttpSession() methods.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Struts Interview Questions

Are interceptors thread safe?

1 Answers  


what r the disadvantages of MVC-2 Architecture?

2 Answers   Process IT,


What is the purpose of @requiredstringvalidator?

1 Answers  


What is struts and why it is used?

1 Answers  


What is validate() and reset() functions?

1 Answers  


What is the purpose of @after annotation?

1 Answers  


What configurations are stored in struts configuration file ?

1 Answers  


What are the features of struts 2?

1 Answers  


How can we display all validation errors to user on jsp page?

1 Answers  


What are the conditions for actionform to work correctly?

1 Answers  


How you will make available any message resources definitions file to the struts framework environment?

1 Answers  


how to create a search field in struts.with code

3 Answers   Infosys, Satyam,


Categories