Hi Andoni
Thanks again for your reply.
I hope I'm understanding what you say correctly, apologies if not. If I rename my WAR to say, app.war, then to access a page the URL would become http://localhost/app/login.jsp. The reason why I changed the appBase to ROOT and renamed my WAR ROOT.war was so that the URL would be http://localhost/login.jsp. This is a customer directive.
Is the problem that I'm going about this the wrong way in the first place? Can I have an app.war and access it like http://localhost/login.jsp?
Best regards Andrew
Andoni wrote:
Ok, You can ignore the <logger>'s and <valve>'s when you are worrying about configuration. So what you are left with is:
<Engine name="Catalina" defaultHost="localhost" debug="9"> <Host name="localhost" debug="9" appBase="webapps" unpackWARs="true" autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false"> <Context path="/" docBase="ROOT" debug="9"> </Context> </Host> </Engine>
What you have to be aware of is that "ROOT" is more than just another name for a webapp. ROOT is a special name for the default webapp in a host. Therefore what you should do is to remove all references to root. Comment out this line of the server.xml, call your .war file something else and set the path="".
Regards, Andoni.
----- Original Message ----- From: "Andrew Watters" <[EMAIL PROTECTED]>
Newsgroups: gmane.comp.jakarta.tomcat.user
Sent: Friday, November 12, 2004 11:30 AM
Subject: Re: Context element problems in conf/server.xml
toThanks for your reply. Please find below the tags as requested. Thank you for taking the time.
<Engine name="Catalina" defaultHost="localhost" debug="9"> <Valve className="org.apache.catalina.valves.RequestDumperValve"/> <Logger className="org.apache.catalina.logger.FileLogger" prefix="catalina_log." suffix=".txt" timestamp="true"/> <Realm className="org.apache.catalina.realm.UserDatabaseRealm" debug="9" resourceName="UserDatabase"/> <Host name="localhost" debug="9" appBase="webapps" unpackWARs="true" autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false"> <Context path="/" docBase="ROOT" debug="9"> <Environment name="servername" type="java.lang.String" value="dev.andrew" override="false"/> </Context> <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs" prefix="localhost_access_log." suffix=".txt" pattern="common" resolveHosts="false"/> <Logger className="org.apache.catalina.logger.FileLogger" directory="logs" prefix="localhost_log." suffix=".txt" timestamp="true"/> </Host> </Engine>
Andoni wrote:
Hello,
You certainly don't need the "/" in the path attribute. This is not going
work as it cannot match just one slash.
Would you please post the <Engine> <Host> and <Context> tags. They should all be seen as a group to know exactly what's being called.
Andoni.
----- Original Message ----- From: "Andrew Watters" <[EMAIL PROTECTED]>
Newsgroups: gmane.comp.jakarta.tomcat.user
Sent: Thursday, November 11, 2004 4:19 PM
Subject: Context element problems in conf/server.xml
Hi
I posted a problem a couple of days ago which I've made some progress
with.
Originally my webapp ROOT.war would not unpack. I've figured out the problem was with the Context element as shown below
<Context path="" docBase="ROOT" debug="9"> <Environment name="servername" type="java.lang.String" value="dev.andrew"/> </Context>
If I unpacked ROOT.war manually then my application worked fine.
By adding a forward slash to the path attribute as shown below
<Context path="/" docBase="ROOT" debug="9"> <Environment name="servername" type="java.lang.String" value="dev.andrew"/> </Context>
tomcat now unpacks the WAR fine. However, my application no longer starts because it cannot find the 'servername'! Yikes!
Does anybody have any suggestions please?
Thanks again Andrew
--------------------------------------------------------------------- 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]