tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Her, Andre" <andre....@eds.com>
Subject RE: AW: Setting Context Path of Webapp as Root on Tomcat 5.5.3
Date Fri, 05 Nov 2004 12:32:13 GMT
Here is what worked for me (Tomcat 3.3.2 )
   -->
        <Context path=""
                 docBase="webapps/Base"
                 debug="0"
                 reloadable="true" >
                 <LogSetter name="Base.log"
                    path="logs/Base.log"
                    servletLogger="true"
                  />
        </Context>

</webapps>

in apps-198.xxx.xxx.xxx.xml in the conf directory.
I guess that it can be defferent for tomcat 5.5.3.

But we never know!
Regards

-----Original Message-----
From: Jojo Paderes [mailto:jojo.paderes@gmail.com]
Sent: Friday, November 05, 2004 1:24 PM
To: tomcat-user@jakarta.apache.org
Subject: Re: AW: Setting Context Path of Webapp as Root on Tomcat 5.5.3


Here's my context.xml file:

<Context displayName="My Web App"
       path=""
       docBase="mywebapp.war"
       reloadable="true"
       useNaming="true"
       debug="5"
       unpackWAR="true">
</Context>

Seems to be not working either. When I access the root context
(http://localhost), I still get the Tomcat default page and not my
webapp's index page. I'm deploying my webapp on a default Tomcat 5.5.3
setup. I will try this on 5.5.4.

Am I missing something here like some configurations on the server.xml
or web.xml under $CATALINA_HOME/conf/?

The simplest solution, as Nick suggested, is to rename my webapp WAR
file to ROOT.war. I'm looking at a solution similar on a typical EAR
file deployment on a J2EE app (i.e. Jboss) where I can specify my
webapp to use the root context path in the application.xml file.

On Fri, 5 Nov 2004 13:00:15 +0100, Nick Pellow
<nick.pellow@mindmatics.de> wrote:
> Hi Jojo,
> 
> I wanted to do the same as you. I got it to work,
> when the context path is the empty string "".
> ie.
> <Context path="" docBase="myrootapp.war"
> 
> What however was annoying, was that tomcat then unpacks
> this war in a directory called ROOT. Hence, when you restart
> tomcat, it deploys the webapp under ROOT with context of /,
> *and*, the webapp called myrootapp.war with context of /myrootapp .
> 
> Problem was, that I have my META-INF/context.xml in myrootapp.
> This seems to cause a lot of confusion for tomcat.
> 
> The cleanest solution I found, was to call myrootapp.war ROOT.war...
> 
> I would like to know a neater solution if there is one..
> 
> Cheers,
> nick
> 
> >-----Ursprungliche Nachricht-----
> >Von: Jojo Paderes [mailto:jojo.paderes@gmail.com]
> >Gesendet: Freitag, 5. November 2004 12:45
> >An: tomcat-user@jakarta.apache.org
> >Betreff: Setting Context Path of Webapp as Root on Tomcat 5.5.3
> >
> >
> >Hi,
> >
> >Is there a way to set a webapp to use the root context path in Tomcat
> >5.5.3. For example, I want to access by webapp named "mywebapp" by
> >using this url:
> >
> >http://mydomain.com/
> >
> >instead of this:
> >
> >http://mydomain.com/mywebapp/
> >
> >In a J2EE EAR file, I can set the webapp to use the root context path
> >by setting the <context-root> value to /. I'm looking for a similar
> >way on WAR file deployed on Tomcat.
> >
> >I was able to do this by just renaming my webapp to ROOT, but I prefer
> >something else. Any suggestions?
> >
> >
> >regards,
> >
> >jOjO

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message