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

RestartResponseAtInterceptPageException - add public function to retrieve originalUrl



    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 7.0.0-M1, 6.16.0
    • None
    • None



      we have an ecommerce website programmed with wicket, which runs in a kinda complex structure. We have multiple instance running of the same wicket application, but each instance has different database/settings/.. behind it. Each instance runs also on different domain.
      For example, we have hostnames like this:

      • www.myapp-a.com => goes to wicket-application a
      • www.myapp-b.com => goes to wicket-application b
      • www.myapp-c.com => goes to wicket-application c

      Each login from our ecommerce platform is linked to one specific application instance (f.e. login1 is linked to myapp-a, login2 is linked to myapp-b, ...) When somebody logs in into one of the different instances of the application, the login is then checked, and if not the correct application, the user is then redirected to the correct hostname (f.e. if login2 logs in to myapp-a, he will be redirected to myapp-b).

      To make a long story short... When redirecting to another domain, we want to pass the mounted page and page parameters that where initially asked (before redirecting to login page).
      Looked into wicket code a bit, this information is stored into the RestartResponseAtInterceptPageException class, but can not be retrieved.
      Is it possible to make such a public function, f. e.:
      static Url getOriginalDestination()
      InterceptData data = InterceptData.get();
      if (data != null)

      { return data.originalUrl); }


      Thanks in advance ! Kind Regards, Marieke Vandamme




            mgrigorov Martin Tzvetanov Grigorov
            marie Marieke Vandamme
            0 Vote for this issue
            2 Start watching this issue