Uploaded image for project: 'Wicket'
  1. Wicket
  2. WICKET-5018

redirectToInterceptPage results in 404 when url-rewriting is active

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Duplicate
    • 6.5.0
    • None
    • wicket
    • None
    • tomcat 7, wicket 6.5, Firefox/Internetexplorer

    Description

      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

      Attachments

        1. QuickStart.20130228.zip
          4.18 MB
          Jürgen Brardt
        2. QuickStart.zip
          21 kB
          Jürgen Brardt

        Issue Links

          Activity

            People

              Unassigned Unassigned
              jbrardt Jürgen Brardt
              Votes:
              2 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: