开发者

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

existin开发者_运维技巧g 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).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜