[ 
https://issues.apache.org/jira/browse/WICKET-5018?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13588463#comment-13588463
 ] 

Jürgen Brardt commented on WICKET-5018:
---------------------------------------

what did you try?

if you configure tomcat to use url-rewriting instead of cookies for 
sessionhandling, the click on the first-page should result in an HTTP 404.
Using cookies, everything works fine.
I just replayed it:

http://localhost:8080/QuickStart/  (HomePage -> Page C) results in redirect to

 
http://localhost:8080/QuickStart/wicket/page;jsessionid=0C7F977E3E5C07F2C5720073AFD08F3F?1
       (An intercept Page -> Page B)

this page contains the link to click next

the click results in a call to this URL:

http://localhost:8080/QuickStart//QuickStart;jsessionid=0C7F977E3E5C07F2C5720073AFD08F3F
            (Should have been the HomePage again -> Page C)

it should in fact result in 

http://localhost:8080/QuickStart;jsessionid=0C7F977E3E5C07F2C5720073AFD08F3F

as it does with Session-Cookies enabled.


-----

The internal "story" is:

User calls Startpage (Page C). 
Page C requires User to have visited Page B before (e.g. to log in) and there 
fore redirectsToInterceptPage B.
The "click" link then should send the User back to PageC, the actual 
targetPage, which results in an HTTP 404 as described above.

-----

hope this helps a little.




                
> redirectToInterceptPage results in 404 when url-rewriting is active 
> --------------------------------------------------------------------
>
>                 Key: WICKET-5018
>                 URL: https://issues.apache.org/jira/browse/WICKET-5018
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 6.5.0
>         Environment: tomcat 7, wicket 6.5, Firefox/Internetexplorer
>            Reporter: Jürgen Brardt
>         Attachments: QuickStart.zip
>
>
> I have the following setup:
> Tomcat 7 with urlrewriting activated for sessionhandling
> Page a is the homepage of my WicketApplication and requires the User to be 
> Authenticated.
> If the caller is not Authorized, page b redirects to LoginPage l, which 
> contains an ajax-based loginform. After successfull login, the form calls 
> continueToOriginalDestination() which leads to an HTTP 404 error.
> The URL-Causing the 404 result is sth. like:
> /context//context/;jsessionId=...../?...
> it should be sth. like:
> /context/;jsessionId=.../?
> the coding is:
> class A extends WebPage{
>   public A(){
>      ..
>      if(Session.isLoggedIn() == false){
>         redirectToInterceptPage(new L());
>      }
> }
> class L extends WebPage{
>    public L(){
>      addForm(){ onSubmit(){ continueToOriginalDestination();
>               } }
>   }
> }
> I tracked it Down to the ServletWebResponse.encodeUrl Method which does the 
> following:
> fullUrl = http://localhost:8080/nubodent
> encodedFullUrl = 
> http://localhost:8080/context;jsessionid=9C3C51AA3D018E44EA85044012CA504D
> _encodedUrl    = /contextt;jsessionid=9C3C51AA3D018E44EA85044012CA504D
> after renderRelativeUrl
> endcodeRelativeUrl = ..//context;jsessionid=9C3C51AA3D018E44EA85044012CA504D
> and then back in the "browser" it is
> /context//context;jsessionid=...
> as stated above.
> I wonder if there really is something wrong, or if Iam the Error, programming 
> it like this.
> Thanks for any helpful hints.
> Jürgen

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to