webtier@glassfish.java.net

No managed session attribute.

From: <webtier_at_javadesktop.org>
Date: Tue, 10 Jun 2008 14:37:11 PDT

My web app deploys fine but I can NOT get it to maintain a session attribute. Given the following simple test.jsp:

<%@ page import="java.util.*"%>
session.isnew=<%=session.isNew()%><br>
attr=<%=(String)session.getAttribute("test")%><br>
<%
session.setAttribute("test", "testval");
%>

The above continuously returns the same output on every page hit of the same session:

session.isnew=true
attr=null

Instead, I expect to see:

Hit #1:

session.isnew=true
attr=null

Hit #2:

session.isnew=false
attr=testval

And so on. Why is every hit of the same session treated as a "new" session?
[Message sent by forum member 'jameshr' (jameshr)]

http://forums.java.net/jive/thread.jspa?messageID=279548