Return-Path: X-Original-To: apmail-geronimo-user-archive@www.apache.org Delivered-To: apmail-geronimo-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D279DC81B for ; Tue, 5 Jun 2012 02:55:32 +0000 (UTC) Received: (qmail 22894 invoked by uid 500); 5 Jun 2012 02:55:32 -0000 Delivered-To: apmail-geronimo-user-archive@geronimo.apache.org Received: (qmail 22831 invoked by uid 500); 5 Jun 2012 02:55:32 -0000 Mailing-List: contact user-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: user@geronimo.apache.org List-Id: Delivered-To: mailing list user@geronimo.apache.org Received: (qmail 22819 invoked by uid 99); 5 Jun 2012 02:55:31 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 Jun 2012 02:55:31 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=FSL_RCVD_USER,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of daxiezhi@gmail.com designates 209.85.160.182 as permitted sender) Received: from [209.85.160.182] (HELO mail-gh0-f182.google.com) (209.85.160.182) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 Jun 2012 02:55:23 +0000 Received: by ghbz22 with SMTP id z22so4635829ghb.13 for ; Mon, 04 Jun 2012 19:55:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=UBjGDwIBEwxWOc4R98khJEkp0QBueyabSqrQf7qO+RE=; b=V/gF+Q7AtUzxqASjLDE/CFX5z2JMzijL+uIjz/dmvg8v7OBBNK//B+EJYBOdAhFOo1 uWqatCZA1U6hU9dlS7qBZEgqfcv/czkDgXHubU7WialeYpZklV34psoxcdbQFlRpHZzy K8QhTm31AhBI53d4QaZ+JxrYqGFtiH775TPZ/qkVcMmDtM5R9XzaxMuBVDonlJYS0VjS a2Vp3LHhdVdKWSzfn0CeMNZ2gCsuFVUAjtZ952WIat5uM+3mqLHszWezvG8rd6euDHKN yB1VedXsn3dWuNCiz6zLHZBDO33kE9G4vG0GAewdj1Ie5cA141oFa2tNL7aZu/Jqk5WZ azAA== MIME-Version: 1.0 Received: by 10.50.213.71 with SMTP id nq7mr481497igc.12.1338864902673; Mon, 04 Jun 2012 19:55:02 -0700 (PDT) Received: by 10.64.76.232 with HTTP; Mon, 4 Jun 2012 19:55:02 -0700 (PDT) In-Reply-To: References: Date: Tue, 5 Jun 2012 10:55:02 +0800 Message-ID: Subject: Re: ISSUE: Root context puts double backslash "//" in urls From: Zhi Xie To: user@geronimo.apache.org Content-Type: multipart/alternative; boundary=14dae9340fabed166704c1b0c6c5 --14dae9340fabed166704c1b0c6c5 Content-Type: text/plain; charset=ISO-8859-1 Do you notice the context-root '/' has been used by the component "org.apache.geronimo.configs/welcome-tomcat/2.2.1/car". I guest you need to uninstall that component before you want to use the context-root. There is a guide in http://yourdomain:8080/. Please check it if works. *Would you like your application to appear at this URL?* To set the context root for a Web application, you can write a Geronimo deployment plan that uses the context-root element to specify the URL prefix used to reach that application. If you specify a context root of "/"then the application will appear at this URL. However, you'll need to stop this small Welcome application first! Your Web deployment plan should look like this, and you can either pack it into the WAR at WEB-INF/geronimo-web.xml or provide it as a separate argument to the deploy tool. com.MyCompany MyWebApp 1.0 / Then you can stop this application and deploy yours from the Admin Consoleor from the command line with a sequence of commands like this: deploy.[bat|sh] stop org.apache.geronimo.configs/welcome-tomcat/{geronimoVersion}/car deploy.[bat|sh] deploy MyWebApp-1.0.war 2012/6/5 George Mulligan > I am using Geronimo version 2.2.1 with Tomcat 6. I am deploying a war to > the root context. I set context-root to "/" in the geronimo-web.xml file. > This is working for the most part but now the links and resources in my > pages have a double backslash in them. > > Examples: > http://mydomain//index.html > > I want it to be > http://mydomain/index.html > > Any ideas how i can accomplish this? > > Thanks > -- Best Regards Gary Apache Geronimo --14dae9340fabed166704c1b0c6c5 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Do you notice the context-root '/' has been used by the component &= quot;org.apache.geronimo.configs/welcome-tomcat/2.2.1/car". I guest yo= u need to uninstall that component before you want to use the context-root.=

There is a guide in http= ://yourdomain:8080/. Please check it if works.

Would you like your application to appear at this URL= ?
To set the context root for a Web application, you can writ= e a Geronimo deployment plan that uses the context-root element to specify= the URL prefix used to reach that application. If you specify a context root of <= tt>"/" then the application will appear at this URL. However, you'll n= eed to stop this small Welcome application first!

Your Web deployment plan should look like this, and you = can either pack it into the WAR at WEB-INF/geronimo-web.xml or provide it = as a separate argument to the deploy tool.

<web-app xmlns=3D"http://geronimo.apache.org/xml/ns/j2ee/web-2.0"=20
        xmlns:dep=3D"http://geronimo.apache.org/xml/ns/deployment-1.2">

    <dep:environment>
        <dep:moduleId>
            <dep:groupId>com.MyCompany</dep:groupId>
            <dep:artifactId>MyWebApp</dep:artifactId>
            <dep:version>1.0</dep:version>
        </dep:moduleId>
    </dep:environment>
    <context-root>/</context-root>
</web-app>

Then you can stop this application and deploy yours from= the Admin Console or from th= e command line with a sequence of commands like this:

deploy.[bat|sh] stop org.apache.geronimo.configs/welco=
me-tomcat/{geronimoVersion}/car
deploy.[bat|sh] deploy MyWebApp-1.0.war
--14dae9340fabed166704c1b0c6c5--