Session scope on Tomcat/Linux
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Michael_Murphy
Posted On:   Monday, November 15, 2004 09:44 AM

I have an application running on a Windows Server machine, which I am trying to port to Linux Red Hat 9. Within my application, I set session attributes within the servlet: public String perform(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException, Exception { { HttpSession session = request.getSession(); .... session.setAttribute("sessionBean", svo); .... } and I also retrieve the attributes: public String perform(HttpServletRequest request, HttpServletResponse r   More>>

I have an application running on a Windows Server machine, which I am trying to port to Linux Red Hat 9. Within my application, I set session attributes within the servlet:



public String perform(HttpServletRequest request,

HttpServletResponse response)

throws IOException, ServletException, Exception {

{

HttpSession session = request.getSession();

....

session.setAttribute("sessionBean", svo);

....

}





and I also retrieve the attributes:




public String perform(HttpServletRequest request,

HttpServletResponse response)

throws IOException, ServletException, Exception

{

HttpSession session = request.getSession();

SessionVO svo = (SessionVO)session.getAttribute("sessionBean");

...

}





The problem is that the attributes stored in the "session" scope are not available when I go to retrieve them. There is no problem on Windows where this exact same code works correctly, just Linux. Request scoped attributes work fine on both platforms. Any help or a good steer would be appreciated.

   <<Less

Re: Session scope on Tomcat/Linux

Posted By:   Michael_Murphy  
Posted On:   Wednesday, November 17, 2004 12:48 AM

Issue resolved. I had cookies disables from the Linux server and despite not using cookies, the sessions were not persisting accross requests. I do not understand the WHY, but by enabling cookies, the problem was resolved.
About | Sitemap | Contact