Details
Description
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 "".
> ----------
>
Attachments
Issue Links
- is cloned by
-
GERONIMO-5216 CLONE -getContextRoot() returns forward slash rather than empty string for apps deployed to root context
- Open