aspose file tools*
The moose likes Struts and the fly likes Access to HttpServlet inside the Action class. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Access to HttpServlet inside the Action class." Watch "Access to HttpServlet inside the Action class." New topic
Author

Access to HttpServlet inside the Action class.

Ravi Kiran Va
Ranch Hand

Joined: Apr 18, 2009
Posts: 2234

Hi ,

what is the use of getting access to HttpServletRequest and using request.getParameter("attributename") inside the Action class of struts2 as all the data is passed through setters and geters only .



Save India From Corruption - Anna Hazare.
Ankit Garg
Sheriff

Joined: Aug 03, 2008
Posts: 9280
    
  17

What if you want request headers or want to know the client IP address, you'll need the request object for that...


SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
Ravi Kiran Va
Ranch Hand

Joined: Apr 18, 2009
Posts: 2234


I did not thought of that ones
Thank you
 
Consider Paul's rocket mass heater.
 
subject: Access to HttpServlet inside the Action class.
 
Similar Threads
calling the right "this" object from inner class
Accessing the ActionForm inside a Servlet Filter
Not able to Call The Action class
Model or bean class is not available to Action Class
how to set value of text field