I guess in this case you will be setting variables on Servlet Context, which is
shared by all sessions. Thus several users accessing this functionality will be
overwriting each other's values (concurrency problem). The better solution is
to use
inside of JetSpeed application:
PortletSession portletSession = (PortletSession)session;
portletSession.setAttribute("a", "a", PortletSession.APPLICATION_SCOPE);
outside of JetSpeed:
session.getAttribute ("a");
For this to work you also need to enable crossContext feature in the Context
configuration for jetspeed applications.
Probably in $TOMCAT_HOME/conf/Catalina/localhost/jetspeed.xml
<Context path="/ifs" docBase="ifs" crossContext="true">
Hope this helps.
Anton
Akshay Ahooja <[EMAIL PROTECTED]> wrote: I figured it out...
If someone else is looking to do this:
Since you are opening a new session you need to go one level back and get
the servlet context itself before setting any attributes.
This can be done using:
request.getSession().getServletContext().setAttribute("a",a);
...
request.getSession().getServletContext().getAttribute("a"); //external
webapp in a new window
Thanks,
Akshay
On 7/17/06, Akshay Ahooja wrote:
>
> Hi,
>
> I have some external previously made apps that I would like users to be
> able access from Jetspeed. Instead of just creating a link to the page, I
> would like to pass the external app some user information that can be used
> for attribute purposes.
>
> How would I pass values from a Jetspeed-2 Portlet to a new regular web app
> window? (both Struts Based)
>
> I don't think that setAttribute would work since it would open up a whole
> new session right?
>
> Thanks,
>
> Akshay
>
---------------------------------
Do you Yahoo!?
Everyone is raving about the all-new Yahoo! Mail Beta.