Recently developed a project, as follows, A project passes the user name and password to the B project, before the transfer must first determine A project which is logged, only after login to jump from Project A to Project B (in A projects a link to a controller B project), and jump start the project after the completion of a B browser. when I jump from a to B project project, the project also found that a re-login, session lost is null, blocked by the filter, Best not the solution. After reading a blog https://blog.csdn.net/weixin_33716557/article/details/91743730 , which modify the server.xml tomcat among resolve the problem, I would like to thank the brother! server.xml configured as follows
<Host name="localhost" appBase="webapps" unpackWARs="false"
xmlValidation="false" xmlNamespaceAware="false"
deployOnStartup="false" autoDeploy="false">
<!-- <Context path="" reloadable="true" docBase="D:\workes\gools\Web" workDir="D:\workes\gools\work"/>D:\workes\GFTSPMS-->
<!-- <Context path="/" reloadable="true" docBase="F:\develop\Myworkspace\ABC\web" workDir="F:\develop\Myworkspace\ABC\work" /> -->
<Context path="" reloadable="true" docBase="F:\develop\Myworkspace\XYDai\Web" workDir="F:\develop\Myworkspace\XYDai\work" sessionCookiePath="/" sessionCookieName="meber" />
</Host>
Focus is on the red part of the sentence which, sessionCookieName among the "member" is that I lost the session, after the configuration problem
<Context path="" reloadable="true" docBase="F:\develop\Myworkspace\XYDai\Web" workDir="F:\develop\Myworkspace\XYDai\work" sessionCookiePath="/" sessionCookieName="meber" />