Incorrect URL handling of mounted pages
---------------------------------------
Key: WICKET-3411
URL: https://issues.apache.org/jira/browse/WICKET-3411
Project: Wicket
Issue Type: Bug
Components: wicket
Affects Versions: 1.4.15
Reporter: Stanislav Dvorscak
Exception:
org.apache.wicket.WicketRuntimeException: unable to find component with path
homePageLink on stateless page [Page class = test.HomePage, id = 0, version =
0] it could be that the component is inside a repeater make your component
return false in getStatelessHint()
For full stack trace please run the example.
Steps:
1. go to home page
2. click on link which is the point to the test page
3. restart the jetty server (simulation of session expired)
4. click on link from the test page ~ exception
Problem description:
1.
If you mount some page to any point. But there is no backslash on the end of
URL. The other links created on the same page has the relative url e.g.: "?...".
It means there is the home page with URL:
http://localhost:8082/home?wicket:bookmarkablePage=:test.TestPage
2.
You click on the link and the URL of browser will be as:
http://localhost:8082/home?wicket:bookmarkablePage=:test.TestPage
There is some other link/interface listener/.... with the relative URL again as
the ?....
Test page with URL:
http://localhost:8082/home?wicket:interface=:5:homePageLink::ILinkListener::
It is really bad, because interface is pointed to different page, it will be no
problem if the session is still valid, but what about if the session was
already expired?
The wicket procession find stateless page, but there is no link, it is on
different page.
It can be fixed on the level of processing of stateless pages, or it can be
fixed with the redirection to the URL which still ends with '/'.
The second thing is more transparent, because URL is still valid, with the
direction to the valid page.
I tried multiple hacks, but only redirection is working for me. The problem is,
that if I change something, probably I corrupt URL of error pages, or
resources, ...
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira