Ooops, I think the [code] tags removed the content. Here is the context.xml <Context path="" docBase="C://Program Files//Apache Software Foundation//Tomcat 5.5//webapps//test"> <Resource name="jdbc/testDB" factory="org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory" auth="Container" type="javax.sql.DataSource" maxActive="10" maxIdle="5" maxWait="10000" removeAbandoned="true" removeAbandonedTimeout="60" logAbandoned="true" username="username" password="password" driverClassName="com.mysql.jdbc.Driver" url="jdbc:mysql://localhost:3306/test" /> </Context>
and here is the Host element in the conf/server.xml <Host name="www.test.com" deployOnStartup="true" debug="0" appBase="webapps" unpackWARs="true" autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false"> <Valve className="org.apache.catalina.valves.FastCommonAccessLogValve" prefix="test_access_log." suffix=".txt" pattern="common" directory="C://Program Files//Apache Software Foundation//Tomcat 5.5//webapps//test//logs"/> </Host> I assume that if I modify the appBase of the Host element from webapps to webapps/test then it would work, but if I have several Contexts for the specific Host, how should I configure it then? Please help by giving examples! Markus Schönhaber-10 wrote: > > jerrycat wrote: > >> I understand that Tomcat 5.5 prefers that your web application comes with >> a >> context.xml file under the META-INF folder. > > OK. > >> So I added a context.xml file under the META-INF folder of my web >> application, please have a look below. >> >> context.xml >> [code] >> >> [/code] > > Looks very ... hm ... clean. > >> Ok, that is good so far, but how do I configure the Host element. >> >> I mean how do you link a specific Host to a specific Context? >> before, the Context element was a sub element of the Host element, now it >> is >> completely separated. > > Deploy your webapp to the directory you configured as appBase for the > corresponding host. > >> Host element in server.xml >> [code] >> >> >> [/code] > > Rather clean also. > > Regards > mks > > --------------------------------------------------------------------- > To start a new topic, e-mail: users@tomcat.apache.org > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/Tomcat-5.5-context.xml%2C-how-to-configure-the-Host-element-tp19152267p19158783.html Sent from the Tomcat - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]