Hi,

We got lot of allready written code with method
signatures where it has HttpServletRequest as the in
parameter. for e.g. request.getContextPath();

Other reason is it works in a normal struts 2.0.6
application, I wanted to do the same in the portlet
without accessing portlet specific classes.

Thanks,




--- Nils-Helge Garli <[EMAIL PROTECTED]> wrote:

> You can't obtain the servlet request in a container
> independent
> manner. What do you need it for? The only time when
> you can legally
> obtain the servlet request is within an included
> JSP, or when
> dispatching a request to a servlet that is in the
> same web
> application.
> 
> Nils-H
> 
> On 3/23/07, tom tom <[EMAIL PROTECTED]> wrote:
> > 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:
> [EMAIL PROTECTED]
> > For additional commands, e-mail:
> [EMAIL PROTECTED]
> >
> >
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 



 
____________________________________________________________________________________
Now that's room service!  Choose from over 150,000 hotels
in 45,000 destinations on Yahoo! Travel to find your fit.
http://farechase.yahoo.com/promo-generic-14795097

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to