You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by ga...@infoblu.it on 2002/09/09 16:10:58 UTC

tomcat 4.1.10: war deploy in default context not working.

Hi all,
Environment:
     tomcat 4.1.10
     ant 1.5
     solaris 2.8
     JDK 1.4.0_01

I have an application that to work must be deployed in the default
context "/".
It is working fine both when i define it with app.xml into webapps
and when i load it dynamically using the manager "install" command.
The following managers commands:
     install
     remove
     start
     stop
     reload
using path="/" to refer to default context act correctly on the
application.

The problem is that i cannot deploy a war file of the same application
when using default context.

My deploy task is
     <deploy url="${manager.url}"
          username="${manager.username}"
          password="${manager.password}"
          path="/"
          war="file://${dist.home}/${deploy.app.name}.war"/>

and i receive the message
     [mdeploy] OK - Installed application at context path /

If a use manager "list" command i see:

[list] OK - Listed applications for virtual host localhost
[list]
/:running:0:/prd/iv00/portale/tomcat-4.1/work/Standalone/localhost/manager/.war
[list] /manager:running:0:/usr/local/tomcat-4.1/server/webapps/manager
[list] /admin:running:0:/usr/local/tomcat-4.1/server/webapps/admi

In the server.xml file i find now the generated entry:
<Context className="org.apache.catalina.core.StandardContext"
cachingAllowed="true" charsetMapperClass
="org.apache.catalina.util.CharsetMapper" cookies="true" crossContext
="false" debug="0" displayName="Infoviabilita" docBase
="/prd/iv00/portale/tomcat-4.1/work/Standalone/localhost/manager/.war"
mapperClass="org.apache.catalina.core.StandardContextMapper" path="/"
privileged="false" reloadable="false" swallowOutput="false" useNaming
="true" wrapperClass="org.apache.catalina.core.StandardWrapper">
</Context>

In the log i see:
2002-09-09 15:16:27 StandardWrapper[/manager:Manager]: Loading container
servlet Manager
2002-09-09 15:16:27 Manager: init: Associated with Deployer 'localhost'
2002-09-09 15:16:27 Manager: init: Global resources are available
2002-09-09 15:16:27 Manager: deploy: Deploying web application at '/'
2002-09-09 15:16:27 Manager: Uploading WAR file to
/prd/iv00/portale/tomcat-4.1/work/Standalone/localhost/manager/.war
2002-09-09 15:16:30 Manager: Extracting XML file to
/prd/iv00/portale/tomcat-4.1/work/Standalone/localhost/manager/.xml
2002-09-09 15:16:30 StandardHost[localhost]: Installing web application at
context path / from URL
jar:file:/prd/iv00/portale/tomcat-4.1/work/Standalone/localhost/manager/.war!/
2002-09-09 15:16:30 WebappLoader[/]: Deploying class repositories to work
directory /prd/iv00/portale/tomcat-4.1/work/Standalone/localhost/_
2002-09-09 15:16:32 WebappLoader[/]: Deploy class files /WEB-INF/classes to
/prd/iv00/portale/tomcat-4.1/work/Standalone/localhost/_/WEB-INF/classes
2002-09-09 15:16:32 StandardManager[/]: Seeding random number generator
class java.security.SecureRandom
2002-09-09 15:16:32 StandardManager[/]: Seeding of random number generator
has been completed
2002-09-09 15:16:32 StandardWrapper[/:default]: Loading container servlet
default
2002-09-09 15:16:32 StandardWrapper[/:invoker]: Loading container servlet
invoker

Up to now everything looks good but...

If i refer the application as usual via browser i get:
HTTP Status 500 - No Context configured to process this request

If i try to undeploy the app using the manager "undeploy" command i get:
[undeploy] FAIL - No context exists for path /

The odd thing is that now i use manager "install" i see:
[install] OK - Installed application at context path /

and if i list i see (?!):
[list] OK - Listed applications for virtual host localhost
[list]
/:running:0:/prd/iv00/portale/tomcat-4.1/work/Standalone/localhost/manager/.war
[list] /manager:running:0:/usr/local/tomcat-4.1/server/webapps/manager
[list] /:running:0:/prd/iv00/devel/infoviabilita-1.1/build
[list] /admin:running:0:/usr/local/tomcat-4.1/server/webapps/admin

You see the miracle? I have TWO application installed at default
context, one working (that installed with "install" comand) and one not
working (that installed with the "deploy" command).

The only way to get rid of that
/:running:0:/prd/iv00/portale/tomcat-4.1/work/Standalone/localhost/manager/.war
context-not-context is to stop tomcat and manually delete the entry
from web.xml.

Obviously if instead of using path="/" i use any other valid context
to deploy, everything works ok. Well, it works in the sense that
tomcat acts correctly with the application, the app itself won't run
because it's not written to run in a context different from "/" and
its web.xml is not yet complete to have it run from a war file, but
at least i see the app is there.

Is this a bug or am i doing something really odd?

My best regards,  Gabriele.


gabriele.garuglieri@infoblu.it
055-420 2832
388-9473323



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>