Re: HttpServletRequest - in a Portlet

2007-03-26 Thread tom tom
Hi, Without refactoring I can move forward with the following in the portlet class, and pass the req object to the existing methods. RenderRequest req2 = PortletActionContext.getRenderRequest(); HttpServletRequest req =(HttpServletRequest) req2; I cant find any issues y

Re: HttpServletRequest - in a Portlet

2007-03-26 Thread Nils-Helge Garli
As mentioned, this is not possible in a container independant manner. I would recommend that you consider refactoring your code so it uses Map objects instead, as xwork/struts 2 does. Nils-H On 3/26/07, tom tom <[EMAIL PROTECTED]> wrote: Hi, We got lot of allready written code with method sig

Re: HttpServletRequest - in a Portlet

2007-03-25 Thread tom tom
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.

Re: HttpServletRequest - in a Portlet

2007-03-22 Thread Nils-Helge Garli
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 <[E

HttpServletRequest - in a Portlet

2007-03-22 Thread tom tom
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 Http