geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Zhi Xie <daxie...@gmail.com>
Subject Re: ISSUE: Root context puts double backslash "//" in urls
Date Tue, 05 Jun 2012 02:55:02 GMT
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.

<web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-2.0"
        xmlns:dep="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<http://localhost:8080/console>or 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 <gqmulligan@gmail.com>

> 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

Mime
View raw message