简体   繁体   中英

Persisting Session of Tomcat Server Application between re deploymets from Myeclipse IDE

All I am developing an web application using Tomcat 6.X and My Eclipse. When i do some changes in existing java files (Java Class, SERVLETS , Filter) , i have to redeploy it to the tomcat server . but, when i redeploy the application the

existing session becomes null .

is there any way that i can persist the existing session between re deployments from the MY ECLISPE.

From Tomcat Docs

Check here for tutorial on JDBC persistence , tomcat-6-session-persistence-through-jdbcstore

  • FileBased
  • JDBC Based Store

Restart Persistence

Whenver Catalina is shut down normally and restarted, or when an application reload is triggered, the standard Manager implementation will attempt to serialize all currently active sessions to a disk file located via the pathname attribute. All such saved sessions will then be deserialized and activated (assuming they have not expired in the mean time) when the application reload is completed.

In order to successfully restore the state of session attributes, all such attributes MUST implement the java.io.Serializable interface. You MAY cause the Manager to enforce this restriction by including the element in your web application deployment descriptor (/WEB-INF/web.xml).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM