On Jul 31, 2008, at 2:59 AM, Bon wrote:
Hi all,
There is a problem in my program, does it the same topic about this
article?
My J2 is version 2.1.3 and tomcat is 5.5.23.
The following is the detail of my question:
When user login into my Portal, I've set some attributes in
HttpSession
at LoginRedirectorServlet, and I hope those attributes could be
access
in my portlets in my portlet-application.
You are setting attributes in the Jetspeed application's session,
which is different from your portlet application's session. The
servlet spec requires that these attributes are not shared between
applications.
What you can try to do is set a request attribute on the jetspeed
request (servlet) in your login redirector servlet, and then grab the
attribute in your portlet with something like:
Object attribute = null;
Enumeration attributes = renderRequest.getAttributeNames();
while (attributes.hasMoreElements())
{
String name = (String)attributes.nextElement();
attribute = renderRequest.getAttribute(name);
if (attribute!=null)
{
out.print(name + " = " + attribute + "<br/>");
}
}
You may need to set the request attribute in jetspeed after the
redirect, preferably in a valve
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]