Hi all,

I have an application developped using Wicket 1.5.7. The app has a logout
link setting the response page in the onClick() callback to some other page
"NotLoggedIn" (see code below). This is working fine when the app is
deployed to Tomcat 6.0 which I'm using in development mode.

But it fails utterly when the application is being deployed to WebSphere
6.1 with a 404 due to strange redirections:

Server interaction in WebSphere 6.1:

   1) Client requests /xyz/?0-1.ILinkListener-logout
   2) Server answers with 302 to
/xyz/wicket/bookmarkable/de.xyz.pages.nonsecure.NotLoggedIn
3) Client requests
/xyz/wicket/bookmarkable/de.xyz.pages.nonsecure.NotLoggedIn
4) Server answers with 302 to /xyz/de.xyz.pages.nonsecure.NotLoggedIn?0
(which is wrong! this doesn't exist!)
5) Client requests /xyz/de.xyz.pages.nonsecure.NotLoggedIn?0
6) Server answers with 404

As comparison Server interaction in Tomcat (working):

   1) Client requests /xyz/?0-1.ILinkListener-logout
   2) Server answers with 302 to
/xyz/wicket/bookmarkable/de.xyz.pages.nonsecure.NotLoggedIn
   3) Client requests
xyz/wicket/bookmarkable/de.xyz.pages.nonsecure.NotLoggedIn
   4) Server answers with 302 to
/xyz/wicket/bookmarkable/de.xyz.pages.nonsecure.NotLoggedIn?0
   5) Client requests
/pms/wicket/bookmarkable/de.xyz.pages.nonsecure.NotLoggedIn?0
   6) Server answers with 200 etc.

This is the code for setting up the logout link including the original
redirect to NotLoggedIn.class:

  add(new Link<String>("logout", Model.of("Logout")) {
    @Override
    public void onClick() {
      getSession().invalidate();
      setResponsePage(NotLoggedIn.class);
    }
  });

I'm using WicketFilter in my web.xml, where the filter mapping is
configured as follows:

  <filter-mapping>
    <filter-name>wicketFilter</filter-name>
    <url-pattern>/*</url-pattern>
  </filter-mapping>

Thanks for any help!

Best regards,
Jörn

Reply via email to