In general Struts 2 abstracts the request away; the framework populates action properties from request parameters. Assuming the form:the action would just define a "name" property--no need to access the request:You can access request parameters through a map by implementing ParameterAware if really necessary, but it's usually not.
You can access the HttpServletRequest itself by either implementing ServletRequestAware or using the ServletActionContext static utils. It's relatively rare to need to do either of these, and for obvious reasons it's not recommended.
Joined: Jan 30, 2009
Thanks sonny and David for your replies.
I doesn't want to extend the ActionSuppourt class to get access to the data .I want to go with the ServletRequestAware interface only.
so for this can i do directly like this ??
A single class is sufficient or do i need to use anyother class ??
As Dave is saying, things are done differently in Struts 2, and for good reasons.
I suggest that you do some more reading on Struts 2 basics.
A good start will be the tutorial and other resources at http://www.struts2.net/.
There is also a free book available at InfoQ - Starting Struts 2.