You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by George Mulligan <gq...@gmail.com> on 2012/06/05 04:30:10 UTC

ISSUE: Root context puts double backslash "//" in urls

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

Re: ISSUE: Root context puts double backslash "//" in urls

Posted by gqmulligan <gq...@gmail.com>.
Thanks that is the issue I am having.  I verified that things work when
running with Geronimo 2.2.2.  Any idea when a release can be made?



> This is a known issue, and has been fixed in
> https://issues.apache.org/jira/browse/GERONIMO-6171. The changes will be
> included in the next version.
> 
> 2012/6/5 gqmulligan &lt;gqmulligan@&gt;
> 
>>
>> gary wrote
>> >
>> > Sorry, one point should be corrected in my latest reply. Stop  the
>> > component "org.apache.geronimo.configs/welcome-tomcat/2.2.1/car" is
>> enough
>> > before deploying your application.
>> >
>>
>> That is the guide I actually followed.  I verified that the
>> welcome-tomcat
>> component is stopped.  When I go to my domain root I see my application
>> which also verifies this.  However, I still have the double slashes when
>> navigating my application.  The contextPath is returning a "/" when it
>> seems
>> like it should be returning the empty string.
>>
>> --
>> View this message in context:
>> http://apache-geronimo.328035.n3.nabble.com/ISSUE-Root-context-puts-double-backslash-in-urls-tp3985029p3985039.html
>> Sent from the Users mailing list archive at Nabble.com.
>>
> 
> 
> 
> -- 
> Ivan
> 


--
View this message in context: http://apache-geronimo.328035.n3.nabble.com/ISSUE-Root-context-puts-double-backslash-in-urls-tp3985029p3985042.html
Sent from the Users mailing list archive at Nabble.com.

Re: ISSUE: Root context puts double backslash "//" in urls

Posted by Ivan <xh...@gmail.com>.
This is a known issue, and has been fixed in
https://issues.apache.org/jira/browse/GERONIMO-6171. The changes will be
included in the next version.

2012/6/5 gqmulligan <gq...@gmail.com>

>
> gary wrote
> >
> > Sorry, one point should be corrected in my latest reply. Stop  the
> > component "org.apache.geronimo.configs/welcome-tomcat/2.2.1/car" is
> enough
> > before deploying your application.
> >
>
> That is the guide I actually followed.  I verified that the welcome-tomcat
> component is stopped.  When I go to my domain root I see my application
> which also verifies this.  However, I still have the double slashes when
> navigating my application.  The contextPath is returning a "/" when it
> seems
> like it should be returning the empty string.
>
> --
> View this message in context:
> http://apache-geronimo.328035.n3.nabble.com/ISSUE-Root-context-puts-double-backslash-in-urls-tp3985029p3985039.html
> Sent from the Users mailing list archive at Nabble.com.
>



-- 
Ivan

Re: ISSUE: Root context puts double backslash "//" in urls

Posted by gqmulligan <gq...@gmail.com>.
gary wrote
> 
> Sorry, one point should be corrected in my latest reply. Stop  the
> component "org.apache.geronimo.configs/welcome-tomcat/2.2.1/car" is enough
> before deploying your application.
> 

That is the guide I actually followed.  I verified that the welcome-tomcat
component is stopped.  When I go to my domain root I see my application
which also verifies this.  However, I still have the double slashes when
navigating my application.  The contextPath is returning a "/" when it seems
like it should be returning the empty string. 

--
View this message in context: http://apache-geronimo.328035.n3.nabble.com/ISSUE-Root-context-puts-double-backslash-in-urls-tp3985029p3985039.html
Sent from the Users mailing list archive at Nabble.com.

Re: ISSUE: Root context puts double backslash "//" in urls

Posted by Zhi Xie <da...@gmail.com>.
Sorry, one point should be corrected in my latest reply. Stop  the
component "org.apache.geronimo.configs/welcome-tomcat/2.2.1/car" is enough
before deploying your application.

2012/6/5 Zhi Xie <da...@gmail.com>

> 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 <gq...@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
>
>


-- 
Best Regards
Gary
Apache Geronimo

Re: ISSUE: Root context puts double backslash "//" in urls

Posted by Zhi Xie <da...@gmail.com>.
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 <gq...@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