所有
我正在使用Tomcat 6.X和My
Eclipse开发Web应用程序.
当我对现有的java文件(Java Class,SERVLETS,Filter)进行一些更改时,我必须将其重新部署到tomcat服务器.但是,当我重新部署应用程序时
existing session becomes null .
有没有办法可以在MY ECLISPE重新部署之间保持现有会话.
最佳答案 从
Tomcat Docs起
点击这里查看JDBC persistence,tomcat-6-session-persistence-through-jdbcstore的教程
> FileBased
>基于JDBC的商店
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).