I'm a beginner with jsp/servlet/bean. And after many hours of reading, and trying I'm completely frustrated.
I'm trying to move between jsp pages, and I'm always getting a new session. I read many articles and posts but can't find what I'm doing wrong.
In every page I include a "status.jsp" where I check if the user is logged in.
In every jsp page: <%@ include file = "/includes/status.jsp" %>
I always get a new session.
I tried inserting the code into each jsp. Same thing: new session. I've also included <%@ page session="true" %> in each jsp. I know that the default is true, it's just I don't know what else I can try.
I've also tried to send the jsessionid through href. <a href="/jsp/item.jsp?ISBN=<%=isbn%>&jsessionid=<%= session.getId()%>">view </a> Didn't work either
I move the code from one machine to a new one 10 days ago. Could it be a problem with tomcat?
[BSouther: Added UBB CODE tags] [ January 07, 2007: Message edited by: Ben Souther ]
posted 11 years ago
I found the problem!!!
If I access with my IP instead of localhost it works perfect! Why??? Does anybody know?