我有一个名为 BranchMap 的页面,它在用户登录后使用 GoogleMap 向用户显示一些建筑物。数据最初处于受保护(需要密码)情况(在扩展 ProtectedPage 的 CatgoiresXML 中)但我发现谷歌无法登录在系统中,使页面从 WebPage 扩展。但是现在当我转到 BranchMap 页面并按 CTRL+F5 时,页面过期,我指的是 HomePage。有谁知道原因?如果您想了解更多信息,请告诉我放置它们。
1 回答
不完全确定您在描述什么-不太清楚,但看看这是否有帮助:
当某些 Ajax 调用导致页面更改时,可能会发生这种情况,但刷新页面(不可收藏)的 url 引用过期版本会导致此异常。当我们有多个 iframe 调用我们的 wicket 应用程序时,我曾经遇到过这个问题(对不起,模糊的解释 - 这是不久前的事了)。
最后,对于我们的应用程序,我们不得不将不同的 iframe 源拆分为 web.xml 中的不同 servlet——以便完全隔离不同页面的会话——但这是另一回事。
尝试将此添加到您的 wicket 应用程序 init 方法中。
// debug code for fixing session issue (multiple ajax using pages inside
// one browser)
get().getPageSettings().setAutomaticMultiWindowSupport(true);
你能显示堆栈跟踪吗?
您使用的是什么版本的 Wicket?
在 1.4-rc3 之前的 javadoc 中也存在一些错误通信,在此处修补:http: //svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache /wicket/settings/IPageSettings.java?r1=647167&r2=768578&pathrev=768578&diff_format=h
这里的问题:https ://issues.apache.org/jira/browse/WICKET-2233
这是来自 IPageSettings 的 javadoc 中的更新注释:
/**
* Gets whether Wicket should try to support opening multiple windows for the same session
* transparently. If this is true - the default setting -, Wicket tries to detect whether a new
* window was opened by a user (e.g. in Internet Explorer by pressing ctrl+n or ctrl+click on a
* link), and if it detects that, it creates a new page map for that window on the fly. As a
* page map represents the 'history' of one window, each window will then have their own
* history. If two windows would share the same page map, the non-bookmarkable links on one
* window could refer to stale state after working a while in the other window.
* <p>
* <strong> Currently, Wicket trying to do this is a best effort that is not completely fail
* safe. When the client does not support cookies, support gets tricky and incomplete. See
* {@link WebPage}'s internals for the implementation. </strong>
* </p>
*
* @return Whether Wicket should try to support multiple windows transparently
*/
boolean getAutomaticMultiWindowSupport();