Spring 3 MVC会话在外部重定向后丢失 [英] Spring 3 MVC session is lost after external redirect

查看:410
本文介绍了Spring 3 MVC会话在外部重定向后丢失的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Spring 3 MVC应用程序,该应用程序的一部分需要重定向到第三方付款网站,付款网站重定向回我的应用程序完成后。问题是,Spring似乎创建一个新的会话,而不是使用旧的会话,并擦除以前存储在会话中的所有数据。这会对我的应用程序造成大量问题,我想知道是否有一种方法可以在外部重定向后保留会话。

I have a Spring 3 MVC app and part of the app requires a redirect to a 3rd party payment site and that payment site redirects back to my app after it's done. The problem is that Spring seems to create a new session instead of using the old one and erases all the data previously stored in the session. This creates massive problems for my app and I'm wondering if there is a way to preserve the session after external redirect?

此外,我的浏览器和我的cookie确实验证了Cookie中的jsessionid值在重定向后发生更改,表示新会话覆盖旧会话。

Also, cookie are enabled on my browser and I indeed verified that the jsessionid value in the cookie changes after the redirect, indicating a new session overwriting the old one.

推荐答案

提供以下信息:


  1. 从第三方网站回来后,您的应用使用的是不同的域/子域名

  2. 您的工作阶段超时值是否可能会降低,直到使用者返回您的应用程式时,工作阶段已过期。

  3. 您的应用程序是否使用了具有使会话无效的onunload事件的框架?

这篇关于Spring 3 MVC会话在外部重定向后丢失的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆