[英]Login session lost after flex chart is displayed from jsp
I have a java web application. 我有一个Java Web应用程序。 When I log in to that application and navigate to a jsp which has flex chart embeded into it, the chart displayes just fine.
当我登录到该应用程序并导航到一个嵌入了弹性图表的jsp时,该图表显示得很好。 I am using blaze ds remoting object mechanism.
我正在使用blaze ds远程处理对象机制。 But when I want to navigate to a different page, it logs me out of application since the login session is lost.
但是,当我想导航到另一个页面时,由于登录会话丢失,它使我退出了应用程序。
The HTTP session is backed by a HTTP cookie which is tied to a specific domain and by default also the context path. HTTP会话由HTTP cookie支持,该cookie绑定到特定域,默认情况下还绑定到上下文路径。 So if you lose the session, then it may be caused by navigating to a different domain and/or context path.
因此,如果您丢失了会话,则可能是由于导航到其他域和/或上下文路径引起的。 It's however also possible to invalidate the session programmatically by calling
HttpSession#invalidate()
. 但是,也可以通过调用
HttpSession#invalidate()
以编程方式使会话HttpSession#invalidate()
。
So to fix your problem, you need to ensure that you're navigating to a page in the same domain and context and that your server side code is not unnecessarily calling invalidate()
somewhere. 因此,要解决您的问题,您需要确保导航到相同域和上下文中的页面,并且服务器端代码不必在某个地方不必要地调用
invalidate()
。
If the problem is actually caused by a switch in the context path and you'd like to get it fixed, then you need to configure it in the servletcontainer. 如果问题实际上是由上下文路径中的切换引起的,并且您希望将其修复,则需要在servlet容器中对其进行配置。 It's unclear which one you're using, but in for example Apache Tomcat you would like to set the
emptySessionPath
attribute of the <Connector>
element in /conf/server.xml
to true
. 目前尚不清楚您使用的是哪个,但是例如在Apache Tomcat中,您想要将
/conf/server.xml
中的<Connector>
元素的emptySessionPath
属性设置为true
。 Also see this document . 另请参阅此文档 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.