Yes.  The portlet JSP called in step 3 (which I labeled step 4) includes

<%@ page import="javax.portlet.*"%>

<%@ taglib uri="/WEB-INF/tld/portlet.tld" prefix="portletAPI"%>

<portletAPI:defineObjects/>


On 3/8/06, Boyce, Keith Garry <[EMAIL PROTECTED]> wrote:
>
> If it's a jsp in portlet context then use <portlet:defineObjects tag.
>
> -----Original Message-----
> From: Ethan Adams [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, March 08, 2006 9:26 PM
> To: Jetspeed Users List
> Subject: Re: [J2] Passing attributes from a portlet to a servlet...
>
> 1. I have  emptySessionPath="true" set for the AJP connector and the 8080 
> connector.  I'm using AJP with an Apache 2 connector.
> 2. I have the default setting of crossContext="true" in the 
> Catalina/localhost/jetspeed.xml file 3. I hit a portal page with the portlet 
> on it.
> 4. The portlet calls a JSP with this code:
>    <%renderRequest.getPortletSession().setAttribute("test", "MYTEST", 
> PortletSession.APPLICATION_SCOPE);%>
> 5.  Then call a JSP that contains the following directly, and get null.
>    <%=request.getSession().getAttribute("test")%>
>
> Any thoughts?
>
> On 3/8/06, Randy Watler <[EMAIL PROTECTED]> wrote:
> > Ethan,
> >
> > Yes... it does work... at least with JJ svn HEAD:
> >
> > 1. Make sure the portlet is hit first, (e.g. before the servlet in the
> > browser session).
> > 2. You must use APPLICATION_SCOPE portlet attributes.
> > 3. emptySessionPath="true" must be set on the Tomcat connector in use.
> > 4. Tomcat 5.5.4+ is required.
> > 5. crossContext="true" must be set for the jetspeed webapp... which it
> > is by default.
> >
> > HTH,
> >
> > Randy
> >
> > Ethan Adams wrote:
> > > I've seen many posts related to this, but no solutions that work for
> > > me.  My understanding is that the HttpSession backing of
> > > PortletSession is the portal application context session, not the
> > > HttpSession for the portlet context.  Therefore, when the portlet
> > > applications servlet tries to get the session value, it can't.
> > >
> > > I've seen posts (http://issues.apache.org/jira/browse/PLUTO-53) that
> > > say it is a pluto/Tomcat issue, and say setting crossContext="true"
> > > and emptySessionPath="true" will solve the problem.  This didn't
> > > work for me either.
> > >
> > > I'm running Jetspeed 2.0 FINAL on Tomcat 5.5.12.  Anyone solve this 
> > > problem?
> > >
> > >
> > >
> > >> hello
> > >>
> > >> Andrew Hill a écrit :
> > >>
> > >>
> > >>> Firstly you need to explicitly state that its Session Application Scope:
> > >>>
> > >>> PortletSession.setAttribute("listImage", m,
> > >>> PortletSession.APPLICATION_SCOPE);
> > >>>
> > >> i've just tried this, and it didn't work...
> > >>
> > >>
> > >>> Secondly check that your actually getting the same session in your
> > >>> servlet. If you dont see anything in the attributes it would
> > >>> indicate that its probably a different session, as even the
> > >>> PORTLET_SCOPE attributes would show up with some namespacing applied.
> > >>>
> > >> i don't really understand what you mean...
> > >>
> > >>
> > >>> How are you 'calling' the servlet? Is it in the same webapp?
> > >>>
> > >> actually, my servlet is in the same webapp, and is generating a png
> > >> image, so it's called by an <img> markup written in my portlet...
> > >>
> > >>
> > >> Luc
> > >>
> > >> --
> > >> Luc FOUIN - Stagiaire Aptiwan
> > >> 14 rue Niepce
> > >> 75014 Paris
> > >> Tél : 06 77 95 17 24
> > >> Mél : [EMAIL PROTECTED]
> > >>
> > >>
> > >> -------------------------------------------------------------------
> > >> -- 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]
> >
> >
>
>
> This message is a PRIVATE communication.
> If you are not the intended recipient, please do not read, copy,
> or use it, and do not disclose it to others. Please notify the
> sender of the delivery error by replying to this message, and then
> delete it from your system. Thank you.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to