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