wood burning stoves 2.0*
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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
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: 9291
    
  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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Access to HttpServlet inside the Action class.
 
Similar Threads
calling the right "this" object from inner class
Not able to Call The Action class
Model or bean class is not available to Action Class
Accessing the ActionForm inside a Servlet Filter
how to set value of text field