---------------------------------------------------------------------------
HARBOR: http://coolharbor.100free.com/index.htm
Now Tomcat is also a cool pojo application server
---------------------------------------------------------------------------
----- Original Message -----
From: "Eric B." <[EMAIL PROTECTED]>
To: <users@tomcat.apache.org>
Sent: Tuesday, November 20, 2007 12:34 AM
Subject: Re: How to Deploy WAR using a sub-context path?
>"Caldarale, Charles R" <[EMAIL PROTECTED]> wrote in message
>news:[EMAIL PROTECTED]
From: news [mailto:[EMAIL PROTECTED] On Behalf Of Eric B.
Subject: Re: How to Deploy WAR using a sub-context path?
Is it really with a # in the file name??
Yup.
Is there anyway to instruct tomcat to rename the
META-INF/context.xml file to be demo#application.xml
instead of application.xml?
The manager isn't actually part of Tomcat proper, but rather it's just
an application that ships with Tomcat. It's all open-source, so you're
free to make it work as you wish. Shouldn't be too hard to parse the
optional "Context Path" field to handle slash delimiters.
Sure. I realize that. But after more fishing around in the auto deployer
of Tomcat, it seems that there are greater issues within Tomcat itself.
If I rename the war to demo#application.war, with unpackWAR set to true, I
get the following error:
SEVERE: Exception fixing docBase: {0}
java.net.MalformedURLException: no !/ in spec
at java.net.URL.<init>(Unknown Source)
at java.net.URL.<init>(Unknown Source)
at java.net.URL.<init>(Unknown Source)
at
org.apache.catalina.startup.ContextConfig.fixDocBase(ContextConfig.java:889)
The application still tries to launch, but fails miserably:
java.lang.IllegalArgumentException: Document base
/usr/local/tomcat/apache-tomcat-6.0/demo/webapps/demo/application does not
exist or is not a readable directory
If I turn off the unpackWAR setting, the first error goes away (as it is
no longer trying to unpack the war), but it still fails on the second
error - it is still looking for the war as demo/application.war instead of
demo#application.war.
From a cursory inspection, it looks like the # naming convention wasn't
thoroughly tested out for these types of scenarios in Tomcat's
autodeployer. Either that, or I am missing something somewhere obvious.
No, I dont think so, I think this is just an incredibly complex area with a
million tradeoffs.
IDE's have to use it.
It must be able to send a war from a remote machine, or install it locally,
or run one that is unpacked already, sometimes ignore the context, sometimes
not. Allow an IDE to test complex context paths but discourage it from use.
Like I dont know, we figured out how to make it do /Demo/TheWebApp, what
happens if someone drops in a WebApp called Demo now?
Its just complicated.
When the contexts break, but its convenient, we dont mind.
Like when we just change the WebApp name and magic... the /NewName just
happens.
That actually breaks the internal context.xml... but the alternative is to
unpack, change, repack... what user is going to do that.... I think its a
very complicated area... "fix" something like this, you'll have an issue
with an IDE, or something.
Scary stuff ;)
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]