• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
Bartenders:
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

Resin session help  RSS feed

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am new to Resin. I have a web application which runs perfectly fine under Tomcat. Now I have to deploy it to the Resin server. The problem is that the session gets invalidated after user sign in. The following shows how I start a new session:

HttpSession session = req.getSession(true);
session.setAttribute("user", username);

I tried the following two ways and both of them lost the session info.
1. req.getRequestDispatcher(resp.encodeRedirectURL("/a.jsp")).forward(req,resp);
2. resp.sendRedirect(resp.encodeRedirectURL("a.jsp"));

My development environment is:
Windows 2000 Pro, Resin 2.1.14 (not work in Resin 3.0.8 either), MySQL
The Resin configuration looks like:

<session-config>
<session-max>4096</session-max>
<session-timeout>30</session-timeout>
<enable-cookies>true</enable-cookies>
<enable-url-rewriting>true</enable-url-rewriting>
<!--
- Store sessions in the filesystem, so they can persist across
- servlet and class changes.
-
- Uncomment this during development.
-->
<!--
- <file-store>WEB-INF/sessions</file-store>
-->
</session-config>

Thanks in advance for your help.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!