You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Carsten Ziegeler (Resolved) (JIRA)" <ji...@apache.org> on 2012/02/09 16:07:59 UTC
[jira] [Resolved] (SLING-2410) Problems with paths ending with .jsp
in WebSphere
[ https://issues.apache.org/jira/browse/SLING-2410?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Carsten Ziegeler resolved SLING-2410.
-------------------------------------
Resolution: Fixed
Enhance the SlingServlet which forwards to the OSGi framework such that it checks for ((pathInfo == null) && (servletPath.endsWith(".jsp")) and if so create a HttpServletRequestWrapper which overwrites the path info and servlet path getters to return the empty string for the servlet path and the original servlet path as the path info.
Revision: 1242350
> Problems with paths ending with .jsp in WebSphere
> -------------------------------------------------
>
> Key: SLING-2410
> URL: https://issues.apache.org/jira/browse/SLING-2410
> Project: Sling
> Issue Type: Bug
> Components: Launchpad
> Affects Versions: Launchpad Base 2.3.0
> Reporter: Carsten Ziegeler
> Assignee: Carsten Ziegeler
> Fix For: Launchpad Base 2.4.0
>
>
> Found a potential problem with paths ending with *.jsp and WebSphere. The Sling web.xml contains the following mapping:
> <!-- Overwrite Mappings which may be present in default web.xml files -->
> <servlet-mapping>
> <servlet-name>sling</servlet-name>
> <url-pattern>*.jsp</url-pattern>
> </servlet-mapping>
> With the idea to not have any default web.xml grabbing .jsp requests.
> The problem is that servlet path and path info values for requests matching the
> *.jsp pattern are defined differently than if the mapping would be /.
> Thus a request /path/index.jsp mapping *.jsp gets:
> servlet path = /path/index.jsp
> path info = null
> Thus (1) the Http Service bridge implementation assumes the serlvet registered
> at root (because path info is looked at) thus causing the Sling Main Servlet to
> be called. (2) The Sling JCR Resource Resolver assumes the root path because
> path info is null and thus resolves to root and starts the root path redirect
> which causes /index.html to be appended to the request URL.
> It looks like WebSphere is the only known Servlet Container to interpret the
> *.jsp mapping before the / mapping. Tomcat, JBoss, and WebLogic seem to not do
> that.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira