You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by "Matthias Koch (JIRA)" <ji...@apache.org> on 2010/03/30 16:07:27 UTC

[jira] Updated: (GERONIMO-5216) CLONE -getContextRoot() returns forward slash rather than empty string for apps deployed to root context

     [ https://issues.apache.org/jira/browse/GERONIMO-5216?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Matthias Koch updated GERONIMO-5216:
------------------------------------

    Affects Version/s:     (was: 2.1.1)
                           (was: 2.0.2)
                           (was: 2.0.1)
                           (was: 2.1)
                           (was: 2.0)
        Fix Version/s:     (was: 2.0.3)
                           (was: 2.2)
                           (was: 2.1.1)

Hi,

as for me this issue is not fixed in current geronimo version 2.2

either with 
<web:context-root></web:context-root>
or
<web:context-root>/</web:context-root>

i allways get the / 
when using <c:url ... /> wich used getContextPath()

kr Matthias

> CLONE -getContextRoot() returns forward slash rather than empty string for apps deployed to root context
> --------------------------------------------------------------------------------------------------------
>
>                 Key: GERONIMO-5216
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-5216
>             Project: Geronimo
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>          Components: Tomcat
>    Affects Versions: 2.2
>            Reporter: Matthias Koch
>            Assignee: Jay D. McHugh
>
> An app deployed to the root context should have "" returned by getContextRoot() - On Tomcat, we are returning "/".
> dcherk wrote:
> > I am deploying my war file into the root context with the following
> > deployment plan:
> > ----------
> > <web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-2.0"
> >     xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.2"
> >     xmlns:naming="http://geronimo.apache.org/xml/ns/naming-1.2"
> >     xmlns:security="http://geronimo.apache.org/xml/ns/security-1.2">
> >   ...
> >   <context-root></context-root>
> >   ...
> > </web-app>
> > ----------
> > 
> > The application starts up properly, and responds on http://localhost, as
> > expected.
> > 
> > However, when I examine request.getContextPath(), I get a forward slash:
> > "/".
> > 
> > This is incorrect, as far as I can tell.  According to the API
> > (http://java.sun.com/javaee/5/docs/api/javax/servlet/http/HttpServletRequest.html#getContextPath()):
> > ----------
> > For servlets in the default (root) context, this method
> > [HttpServletRequest.html.getContextPath()] returns "".
> > ----------
> > 

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