tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jack Li" <...@MurraysDiscount.com>
Subject how to pass session variables with Tomcat and IIS
Date Wed, 21 Mar 2001 21:48:08 GMT
I can't get session variable passed to next page. I am installed tomcat on
windows 2000 with IIS 5.0.

I set session var Navigator = 2 in page1.jsp as follow:
<%
	session = request.getSession(true);
	session.putValue("Navigator", "2");
%>

Then I try to get the value of Navigator in page2.jsp:
<%
	session = request.getSession(true);

	if(session != null)
		out.println("Has session");
	else
		out.println("No session");

	String nv = (String)session.getValue("Navigator");
	out.println(nv);
%>

The output of page2.jsp is:
Has session
null

What is the problem?

Thanks,
Jack Li


Mime
View raw message