You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Dominik Drzewiecki (JIRA)" <ji...@apache.org> on 2010/08/08 01:25:16 UTC

[jira] Created: (WICKET-2975) Wicket redirects to wrong url upon successful authentication

Wicket redirects to wrong url upon successful authentication
------------------------------------------------------------

                 Key: WICKET-2975
                 URL: https://issues.apache.org/jira/browse/WICKET-2975
             Project: Wicket
          Issue Type: Bug
          Components: wicket-quickstart
    Affects Versions: 1.4.9
         Environment: Tomcat 7.0.2
            Reporter: Dominik Drzewiecki


I've built a simple application extending AuthenticatedWebApplication and reusing Components from wicket-auth. Application behaves differently when deployed to the latest Tomcat 6.0.x (as of time of writing 6.0.29) and Tomcat 7.0.2. While in case of the former everything is fine, the latter causes the redirection to ../index.jsp instead of / (which is a homepage). A quick look at an initial WebRequest constructed in WicketFilter reveals the difference:

Tomcat 6.0.29
[method = GET, protocol = HTTP/1.1, requestURL = http://localhost:28080/blueprint-app/, contentType = null, contentLength = -1, contextPath = /blueprint-app, pathInfo = null, requestURI = /blueprint-app/, servletPath = /, pathTranslated = null]

Tomcat 7.0.2
[method = GET, protocol = HTTP/1.1, requestURL = http://localhost:18080/blueprint-app/, contentType = null, contentLength = -1, contextPath = /blueprint-app, pathInfo = null, requestURI = /blueprint-app/, servletPath = /index.jsp, pathTranslated = null]

Tomcat 7 sems to route the request to JspServlet (observed in HttpServletRequest filter chain). I'm not that much into tomat internals, but I've figured out that it is due to the fact that for the "/" ended requests URIs welcome pages (including index.jsp) should be presented. Overriding the default welcome-file-list in context's web.xml (as defined in ${catalina.base}/conf/web.xml) to not include index.jsp does the trick (DefaultServlet is the filter chain's target instead of JspServlet).

This issue probably belongs to Tomcat, but nevertheless a simple modification to wicket's archetype web.xml renders application usable again.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (WICKET-2975) Wicket redirects to wrong url upon successful authentication on Tomcat 7.0

Posted by "Dominik Drzewiecki (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-2975?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dominik Drzewiecki updated WICKET-2975:
---------------------------------------

    Attachment: blueprint-app.zip

This application contains the appropriate <welcome-file-list> element. In order to demonstrate wrong behavior please remove it from web.xml.

> Wicket redirects to wrong url upon successful authentication on Tomcat 7.0
> --------------------------------------------------------------------------
>
>                 Key: WICKET-2975
>                 URL: https://issues.apache.org/jira/browse/WICKET-2975
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket-quickstart
>    Affects Versions: 1.4.9
>         Environment: Tomcat 7.0.2
>            Reporter: Dominik Drzewiecki
>         Attachments: blueprint-app.zip
>
>
> I've built a simple application extending AuthenticatedWebApplication and reusing Components from wicket-auth. Application behaves differently when deployed to the latest Tomcat 6.0.x (as of time of writing 6.0.29) and Tomcat 7.0.2. While in case of the former everything is fine, the latter causes the redirection to ../index.jsp instead of / (which is a homepage). A quick look at an initial WebRequest constructed in WicketFilter reveals the difference:
> Tomcat 6.0.29
> [method = GET, protocol = HTTP/1.1, requestURL = http://localhost:28080/blueprint-app/, contentType = null, contentLength = -1, contextPath = /blueprint-app, pathInfo = null, requestURI = /blueprint-app/, servletPath = /, pathTranslated = null]
> Tomcat 7.0.2
> [method = GET, protocol = HTTP/1.1, requestURL = http://localhost:18080/blueprint-app/, contentType = null, contentLength = -1, contextPath = /blueprint-app, pathInfo = null, requestURI = /blueprint-app/, servletPath = /index.jsp, pathTranslated = null]
> Tomcat 7 sems to route the request to JspServlet (observed in HttpServletRequest filter chain). I'm not that much into tomat internals, but I've figured out that it is due to the fact that for the "/" ended requests URIs welcome pages (including index.jsp) should be presented. Overriding the default welcome-file-list in context's web.xml (as defined in ${catalina.base}/conf/web.xml) to not include index.jsp does the trick (DefaultServlet is the filter chain's target instead of JspServlet).
> This issue probably belongs to Tomcat, but nevertheless a simple modification to wicket's archetype web.xml renders application usable again.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (WICKET-2975) Wicket redirects to wrong url upon successful authentication on Tomcat 7.0

Posted by "Martin Grigorov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-2975?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Grigorov resolved WICKET-2975.
-------------------------------------

    Resolution: Invalid

Jetty reports:

request [method = GET, protocol = HTTP/1.1, requestURL = http://localhost:8080/wicket-2975/, contentType = null, contentLength = -1, contextPath = /wicket-2975, pathInfo = null, requestURI = /wicket-2975/, servletPath = /, pathTranslated = null]

Wicket extracts this information from the HttpServletRequest implementation:
httpServletRequest.getRequestURI().
 
It looks like a bug it TC7, it is still beta.
See http://www.listware.net/201008/wicket-users/19033-tomcat-7-stylesheet-problem.html

> Wicket redirects to wrong url upon successful authentication on Tomcat 7.0
> --------------------------------------------------------------------------
>
>                 Key: WICKET-2975
>                 URL: https://issues.apache.org/jira/browse/WICKET-2975
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket-quickstart
>    Affects Versions: 1.4.9
>         Environment: Tomcat 7.0.2
>            Reporter: Dominik Drzewiecki
>            Assignee: Martin Grigorov
>         Attachments: blueprint-app.zip
>
>
> I've built a simple application extending AuthenticatedWebApplication and reusing Components from wicket-auth. Application behaves differently when deployed to the latest Tomcat 6.0.x (as of time of writing 6.0.29) and Tomcat 7.0.2. While in case of the former everything is fine, the latter causes the redirection to ../index.jsp instead of / (which is a homepage). A quick look at an initial WebRequest constructed in WicketFilter reveals the difference:
> Tomcat 6.0.29
> [method = GET, protocol = HTTP/1.1, requestURL = http://localhost:28080/blueprint-app/, contentType = null, contentLength = -1, contextPath = /blueprint-app, pathInfo = null, requestURI = /blueprint-app/, servletPath = /, pathTranslated = null]
> Tomcat 7.0.2
> [method = GET, protocol = HTTP/1.1, requestURL = http://localhost:18080/blueprint-app/, contentType = null, contentLength = -1, contextPath = /blueprint-app, pathInfo = null, requestURI = /blueprint-app/, servletPath = /index.jsp, pathTranslated = null]
> Tomcat 7 sems to route the request to JspServlet (observed in HttpServletRequest filter chain). I'm not that much into tomat internals, but I've figured out that it is due to the fact that for the "/" ended requests URIs welcome pages (including index.jsp) should be presented. Overriding the default welcome-file-list in context's web.xml (as defined in ${catalina.base}/conf/web.xml) to not include index.jsp does the trick (DefaultServlet is the filter chain's target instead of JspServlet).
> This issue probably belongs to Tomcat, but nevertheless a simple modification to wicket's archetype web.xml renders application usable again.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (WICKET-2975) Wicket redirects to wrong url upon successful authentication on Tomcat 7.0

Posted by "Dominik Drzewiecki (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-2975?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dominik Drzewiecki updated WICKET-2975:
---------------------------------------

    Summary: Wicket redirects to wrong url upon successful authentication on Tomcat 7.0  (was: Wicket redirects to wrong url upon successful authentication)

> Wicket redirects to wrong url upon successful authentication on Tomcat 7.0
> --------------------------------------------------------------------------
>
>                 Key: WICKET-2975
>                 URL: https://issues.apache.org/jira/browse/WICKET-2975
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket-quickstart
>    Affects Versions: 1.4.9
>         Environment: Tomcat 7.0.2
>            Reporter: Dominik Drzewiecki
>
> I've built a simple application extending AuthenticatedWebApplication and reusing Components from wicket-auth. Application behaves differently when deployed to the latest Tomcat 6.0.x (as of time of writing 6.0.29) and Tomcat 7.0.2. While in case of the former everything is fine, the latter causes the redirection to ../index.jsp instead of / (which is a homepage). A quick look at an initial WebRequest constructed in WicketFilter reveals the difference:
> Tomcat 6.0.29
> [method = GET, protocol = HTTP/1.1, requestURL = http://localhost:28080/blueprint-app/, contentType = null, contentLength = -1, contextPath = /blueprint-app, pathInfo = null, requestURI = /blueprint-app/, servletPath = /, pathTranslated = null]
> Tomcat 7.0.2
> [method = GET, protocol = HTTP/1.1, requestURL = http://localhost:18080/blueprint-app/, contentType = null, contentLength = -1, contextPath = /blueprint-app, pathInfo = null, requestURI = /blueprint-app/, servletPath = /index.jsp, pathTranslated = null]
> Tomcat 7 sems to route the request to JspServlet (observed in HttpServletRequest filter chain). I'm not that much into tomat internals, but I've figured out that it is due to the fact that for the "/" ended requests URIs welcome pages (including index.jsp) should be presented. Overriding the default welcome-file-list in context's web.xml (as defined in ${catalina.base}/conf/web.xml) to not include index.jsp does the trick (DefaultServlet is the filter chain's target instead of JspServlet).
> This issue probably belongs to Tomcat, but nevertheless a simple modification to wicket's archetype web.xml renders application usable again.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (WICKET-2975) Wicket redirects to wrong url upon successful authentication on Tomcat 7.0

Posted by "Martin Grigorov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-2975?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Grigorov reassigned WICKET-2975:
---------------------------------------

    Assignee: Martin Grigorov

> Wicket redirects to wrong url upon successful authentication on Tomcat 7.0
> --------------------------------------------------------------------------
>
>                 Key: WICKET-2975
>                 URL: https://issues.apache.org/jira/browse/WICKET-2975
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket-quickstart
>    Affects Versions: 1.4.9
>         Environment: Tomcat 7.0.2
>            Reporter: Dominik Drzewiecki
>            Assignee: Martin Grigorov
>         Attachments: blueprint-app.zip
>
>
> I've built a simple application extending AuthenticatedWebApplication and reusing Components from wicket-auth. Application behaves differently when deployed to the latest Tomcat 6.0.x (as of time of writing 6.0.29) and Tomcat 7.0.2. While in case of the former everything is fine, the latter causes the redirection to ../index.jsp instead of / (which is a homepage). A quick look at an initial WebRequest constructed in WicketFilter reveals the difference:
> Tomcat 6.0.29
> [method = GET, protocol = HTTP/1.1, requestURL = http://localhost:28080/blueprint-app/, contentType = null, contentLength = -1, contextPath = /blueprint-app, pathInfo = null, requestURI = /blueprint-app/, servletPath = /, pathTranslated = null]
> Tomcat 7.0.2
> [method = GET, protocol = HTTP/1.1, requestURL = http://localhost:18080/blueprint-app/, contentType = null, contentLength = -1, contextPath = /blueprint-app, pathInfo = null, requestURI = /blueprint-app/, servletPath = /index.jsp, pathTranslated = null]
> Tomcat 7 sems to route the request to JspServlet (observed in HttpServletRequest filter chain). I'm not that much into tomat internals, but I've figured out that it is due to the fact that for the "/" ended requests URIs welcome pages (including index.jsp) should be presented. Overriding the default welcome-file-list in context's web.xml (as defined in ${catalina.base}/conf/web.xml) to not include index.jsp does the trick (DefaultServlet is the filter chain's target instead of JspServlet).
> This issue probably belongs to Tomcat, but nevertheless a simple modification to wicket's archetype web.xml renders application usable again.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.