Daniel thanks for the response, but I'm not sure how this answers my
question. I know how to enter a context by editing server.xml or
conf/Catalina/host/blabla.xml. What I don't know is how to add a ROOT
context to a host in the admin webapp.

When I attempt to do it as a blank string ("") it says that the path
must start with a /. When I try to do it with single slash ("/") it gets
added as a single slash in the config file instead of as a blank string.
This causes problems with the site. (And is actually wrong - internally
and in the XML files tomcat refers to the root context as a blank
string).

What I want to know is if it is possible to add a ROOT context with the
administrative webapp, and if so, how to do it.


Thanks,
Matt








----- Original Message ----- 
From: "SANTOS, DANIEL (SBCSI)" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Cc: "Matt Bathje" <[EMAIL PROTECTED]>
Sent: Thursday, August 26, 2004 8:04 PM
Subject: RE: adding root context with admin webapp


Example:
<Context path="" docBase="C:\Projects\myapp\docroot" debug="99">
</Context>

Also, I use deployOnStartup="false" in my <Host>.  Keep in mind that
this used to be called autoDeploy and due to some left-over stuff the
setting "autoDeploy" still pops up in the <Host> if you use the admin
interface (I just keep both of them in there).  This setting
(autoDeploy/deployOnStartup) prevents web apps from loading that don't
have an explicit <Context> defined in either the server.xml or
(preferably) a myapp.xml file under
${CATALINA_HOME}/conf/Catalina/localhost (or actually
${CATALINA_HOME}/conf/${name attribute of <Service> element}/${name
attribute of <Host> element})... Example:

<Host name="localhost" debug="0" appBase="webapps"
       unpackWARs="true" autoDeploy="true"
       xmlValidation="false" xmlNamespaceAware="false">

Anyway, this will prevent the app under ${CATALINA_HOME}/webapps/ROOT
from auto-loading.  Alternately, you can just delete the damn ROOT app.
Sorry for the long explanation, I think it's cleaner to explicitly
declare your app personally with the whole <Context> thing.

Daniel


-----Original Message-----
From: Matt Bathje [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 26, 2004 5:05 PM
To: Tomcat Users List
Subject: adding root context with admin webapp


Hi all.

This message applies to tomcat 5.0.25 and tomcat 5.0.27.

Is it possible to add a root context with the admin webapp? I try to add
it with a single slash (/) but when I do, my whole site gets messed up
with a slash at the front of all style sheets, images and links. You
can't add the root context as blank ("") through the admin webapp.

Looking at the context xml file, it seems as though when added with a
slash ("/") the context is created with the path as "/" instead of as
"".

I looked through bugzilla, and found this:

http://issues.apache.org/bugzilla/show_bug.cgi?id=26399


The message left is very confusing - it says that the root context will
be displayed as "/" in manager apps, but as "" internally and in
server.xml - which is fine - but it also says there is no bug (with
creating root contexts?)

Anyway - I haven't been able to figure out how to do this. Could someone
please let me know if there is a way?


Thanks,
Matt


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to