Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Struts 2 »

HttpServletRequest - in a Portlet

tom tom

2007-03-22

Replies:

Hi,

In my porlet I got the following

public class MyProfileAction extends ActionSupport
implements ServletRequestAware

Hence I implemented the public void
setServletRequest(HttpServletRequest arg0) {

but what I can see is arg0 is null. What is the reason
for this.

How can get hold to the HttpServletRequest?

Currently what I am doing is inside the execute method

RenderRequest req2 =
PortletActionContext.getRenderRequest();
   
   HttpServletRequest req =(HttpServletRequest) req2;


Any risks involve with this?

Thanks





____________________________________________________________________________________
Finding fabulous fares is fun.
Let Yahoo! FareChase search your favorite travel sites to find flight and hotel bargains.
http://farechase.yahoo.com/promo-generic-14795097

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)

©2008 junlu.com - Jax Systems, LLC, U.S.A.