[jboss-user] [JBoss Portal] - Loss of Session Attributes

david.hoffman do-not-reply at jboss.com
Thu Apr 26 13:58:29 EDT 2007


Current Software: JBOSS-PORTAL-2.6-CR1-BUNDLED

I am trying to use session attributes for my application coding.

I have three files:

test1.jsp (in webapp1)

  | <%=request.getSession().getId()%><br>
  | <% request.getSession().setAttribute("test", "SUCCESS"); %>
  | <%=request.getSession().getAttribute("test")%>
  | 

test2.jsp (in webapp1)

  | <%=request.getSession().getId()%><br>
  | <%=request.getSession().getAttribute("test")%>
  | 

test3.jsp (in webapp2)

  | <%=request.getSession().getId()%><br>
  | <%=request.getSession().getAttribute("test")%>
  | 

When I go to http://localhost:8080/webapp1/test1.jsp the output is:
anonymous wrote : 
  | B5926EF39194E3584263C60361905C4C
  | SUCCESS 
  | 

When I go to http://localhost:8080/webapp1/test2.jsp the output is:
anonymous wrote : 
  | B5926EF39194E3584263C60361905C4C
  | SUCCESS 
  | 

When I go to http://localhost:8080/webapp2/test3.jsp the output is:
anonymous wrote : 
  | B5926EF39194E3584263C60361905C4C
  | null 
  | 

The sessionId remains the same across webapps, but the session variables appear to be valid only within the context in which they are set.  The desire is that these values would be available across webapps.

I have seen numerous other forum posts over the past couple years regarding similar problems, however have not found any solutions given to the problem.

Can someone please advise if this is a simple configuration that needs to be made to make session attributes available across webapps on the JBoss App Server that comes bundled with the Jboss Portal 2.6 CR1?

Thank you in advance for your assistance. 

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4041121#4041121

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4041121



More information about the jboss-user mailing list