Return-Path: Delivered-To: apmail-geronimo-dev-archive@www.apache.org Received: (qmail 66845 invoked from network); 14 Mar 2008 19:44:04 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 14 Mar 2008 19:44:04 -0000 Received: (qmail 26431 invoked by uid 500); 14 Mar 2008 19:44:01 -0000 Delivered-To: apmail-geronimo-dev-archive@geronimo.apache.org Received: (qmail 26382 invoked by uid 500); 14 Mar 2008 19:44:01 -0000 Mailing-List: contact dev-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@geronimo.apache.org List-Id: Delivered-To: mailing list dev@geronimo.apache.org Received: (qmail 26369 invoked by uid 99); 14 Mar 2008 19:44:00 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 14 Mar 2008 12:44:00 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 14 Mar 2008 19:43:20 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 2BD75234C099 for ; Fri, 14 Mar 2008 12:42:24 -0700 (PDT) Message-ID: <980849500.1205523744175.JavaMail.jira@brutus> Date: Fri, 14 Mar 2008 12:42:24 -0700 (PDT) From: "Jay D. McHugh (JIRA)" To: dev@geronimo.apache.org Subject: [jira] Commented: (GERONIMO-3921) getContextRoot() returns forward slash rather than empty string for apps deployed to root context In-Reply-To: <1420949494.1205522904365.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/GERONIMO-3921?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12578903#action_12578903 ] Jay D. McHugh commented on GERONIMO-3921: ----------------------------------------- Fix committed to trunk. Sending plugins/tomcat/geronimo-tomcat6-builder/src/main/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java Transmitting file data . Committed revision 637223. > getContextRoot() returns forward slash rather than empty string for apps deployed to root context > ------------------------------------------------------------------------------------------------- > > Key: GERONIMO-3921 > URL: https://issues.apache.org/jira/browse/GERONIMO-3921 > Project: Geronimo > Issue Type: Bug > Security Level: public(Regular issues) > Components: Tomcat > Affects Versions: 2.0, 2.0.1, 2.0.2, 2.0.x, 2.1, 2.1.1, 2.2 > Reporter: Jay D. McHugh > 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: > > ---------- > > > 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"> > > ... > > > > ... > > > > ---------- > > > > 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.