I have a page by name BranchMap that uses GoogleMap to show some building to user after he has logged in. the data was at first in protected(password required) situation (in CategoiresXML which extends ProtectedPage) but i found that google can't log in the system and make the page extended from WebPage. But now when I go to BranchMap page and Press CTRL+F5 the page expires and i refered to HomePage. Does anyone know the reason? if you want more info tell me to put them.
Not entirely sure what you're describing - it's not quite clear, but see if this helps:
This can happen when some Ajax call causes the page to change, but refreshing the page (which isn't bookmarkable) who's urls refers to the expired version causes this exception. I had this problem at one point when we had multiple iframes calling into our wicket app (sorry for the fuzzy explanation - it was a while ago).
In the end, for our application, we had to split the different iframe sources into different servlets within web.xml - in order to completely isolate the sessions of the different pages - but that's another story.
Try adding this to your wicket application init method.
// debug code for fixing session issue (multiple ajax using pages inside
// one browser)
get().getPageSettings().setAutomaticMultiWindowSupport(true);
And check out the documentation here: http://wicket.apache.org/docs/1.4/org/apache/wicket/jmx/PageSettings.html#getAutomaticMultiWindowSupport()
Can you show the stack trace?
What version of Wicket are you using?
There was a bit of a miss-communication in the javadoc prior to 1.4-rc3 as well, patched here: 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
The issue here: https://issues.apache.org/jira/browse/WICKET-2233
Here is the updated comment in the javadoc from IPageSettings:
/**
* 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();