This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Struts and the fly likes Getting request from ActionContext class Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Getting request from ActionContext class" Watch "Getting request from ActionContext class" New topic

Getting request from ActionContext class

Mahendran Aiyappan
Ranch Hand

Joined: Sep 05, 2005
Posts: 102
Hi guys,

I have a doubt on how to get the HttpServletRequest object from ActionContext object. I tried in the following way.But what I need to give in the get method argument which should be a key.

Please give me your comments
Paras Jain
Ranch Hand

Joined: Feb 26, 2005
Posts: 137
I think you should be able to use getApplication() method of action context.

If that does not work the try this key
StrutsStatics.SERVLET_CONTEXT. probably it shud work

Paras Jain
SCJP 5.0
jQuery in Action, 2nd edition
subject: Getting request from ActionContext class
Similar Threads
Get the exception object into Interceptor
interceptor not working in struts 2
Setting request parameter from interceptor and accessing in ActionClass
Dumb Interfaces Question
ActionInvocation.getAction() method