This question being asked many times by many people.

Context path="xxx" is not supposed to be used unless you mention it at
server.xml but its strongly discouraged.CMIIW

so far i only use the war name as its deploy path like foo.war will map to
localhost:8080/foo/<servlet mapping>


On 1/24/07, DHARNA, AJAY [AG/1000] <[EMAIL PROTECTED]> wrote:

Hi,
I had posted this question earlier on the users mailing list and got no
response, so I am going to try and re-post it again and also post it on
the
dev mailing list.

I have recently upgrade from tomcat 5.0.28 to 5.5.20 and everything seems
to
be working fine for most of my apps except for the ones that have context
with multi-level path. Also I should mention that I am not unpacking any
of
my war files. (unpackWARs="false" autoDeploy="true")

I deployed my app - foo.war which had the following context in
foo.war/meta-inf/context.xml

<Context path="/some/foo" docBase="foo.war" debug="0" privileged="true"
reloadable="true"/>


In the Tomcat Manager Application List, I only see the path /foo and also
in
the <TOMCAT_CONF>/Catalina/hostname there is a file called foo.xml. If I
try
to hit the url  < <http://localhost:8080/some/foo>
http://localhost:8080/some/foo>  <http://localhost:8080/some/foo>
http://localhost:8080/some/foo - it doesn't work.

I did some reach on this issue and found a similar issue in bugzilla ( <
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38198>
http://issues.apache.org/bugzilla/show_bug.cgi?id=38198>

<http://issues.apache.org/bugzilla/show_bug.cgi?id=38198>
http://issues.apache.org/bugzilla/show_bug.cgi?id=38198) that mentioned
that
the path element is no longer being used and it mentions that I should
rename the context.xml file to contain the path. According to Bug#:38198
in
bugzilla - the fix is to rename the foo.xml file to be some#foo.xml and
remove the path. So I renamed the file in
<TOMCAT_CONF>/Catalina/hostname/foo.xml to
<TOMCAT_CONF>/Catalina/hostname/some#foo.xml and it now contains the

following:

<Context docBase="foo.war" debug="0" privileged="true" reloadable="true"/>

When I do this and start up tomcat, I get the following error:

SEVERE: Error starting static Resources
java.lang.IllegalArgumentException: Document base
C:\www\tomcat_5.5.20\webapps\some\foo does not exist or is not a readable
directory

        at
org.apache.naming.resources.FileDirContext.setDocBase(FileDirContext.java
:14

0)
        at
org.apache.catalina.core.StandardContext.resourcesStart(
StandardContext.java

:3848)
        at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4019)
        at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java
:7

59)
        at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
        at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
        at
org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java
:608)


        at
org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java
:535

)
        at
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:470)
        at
org.apache.catalina.startup.HostConfig.start(HostConfig.java:1122)
        at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310)
        at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent
(LifecycleSuppor

t.java:119)
        at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1021)
        at
org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
        at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
        at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
        at
org.apache.catalina.core.StandardService.start(StandardService.java:450)
        at
org.apache.catalina.core.StandardServer.start(StandardServer.java:709)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java
:39

)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl

.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)
Jan 19, 2007 3:58:06 PM org.apache.catalina.core.StandardContext start
SEVERE: Error in resourceStart()
Jan 19, 2007 3:58:06 PM org.apache.catalina.core.StandardContext start
SEVERE: Error getConfigured
Jan 19, 2007 3:58:06 PM org.apache.catalina.core.StandardContext start
SEVERE: Context [/some/foo] startup failed due to previous errors
Jan 19, 2007 3:58:06 PM org.apache.catalina.core.StandardContext stop
INFO: Container
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/some/foo]
has not been started


I also tried changing the docBase to be the absolute path of the war file:

some#foo.xml
<Context docBase="C:\www\tomcat_5.5.20\webapps\foo.war" debug="0"
privileged="true" reloadable="true"/>

But I get the same result as above.

Could someone please tell me how they are able to get this to work with
5.5
- what changes do I need to make so that when I deploy my war - foo.war,
it
show up in the Tomcat Manager Application List with path /some/foo

Thanks for your help
Ajay.



---------------------------------------------------------------------------------------------------------
This e-mail message may contain privileged and/or confidential
information, and is intended to be received only by persons entitled to
receive such information. If you have received this e-mail in error, please
notify the sender immediately. Please delete it and all attachments from any
servers, hard drives or any other media. Other use of this e-mail by you is
strictly prohibited.


All e-mails and attachments sent and received are subject to monitoring,
reading and archival by Monsanto. The recipient of this e-mail is solely
responsible for checking for the presence of "Viruses" or other "Malware".
Monsanto accepts no liability for any damage caused by any such code
transmitted by or accompanying this e-mail or any attachment.

---------------------------------------------------------------------------------------------------------





--
-Andre-

People see things the way they are and say "why ?" I see things that never
were and say "Why not ?"

Reply via email to