You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Jürgen Brardt (JIRA)" <ji...@apache.org> on 2013/02/26 10:34:13 UTC

[jira] [Updated] (WICKET-5018) redirectToInterceptPage results in 404 when url-rewriting is active

     [ https://issues.apache.org/jira/browse/WICKET-5018?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jürgen Brardt updated WICKET-5018:
----------------------------------

    Attachment: QuickStart.zip

A Quickstart for the bug as Eclipse/Maven Project.
                
> 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