If you name a context in server.xml, your .war file will *not* be expanded automatically. What you will need to do is stop Tomcat, manually expand the .war file to a directory named "shilton" and then restart. alternatively, you can avoid editing the server.xml and put this in a context configuration file. See the admin.xml and manager.xml files in "webapps" for examples. Basically, you just copy your entire <Context ...> entry to a separate .xml file. I'd name it the same thing as your webapp to make it clear what that file if for, but I don't think that is a requirement. Either way, you need to manually expand your .war file *before* tomcat is restarted.

Alternatively, you can start Tomcat (making sure to have removed the <Context ...> entry from server.xml), create your context configuration file and name it "context.xml". Put that in META-INF of your .war file, and then use the Tomcat manager app's "deploy" command to deploy your .war file. Modify your context to have a docbase with the name of the .war file (I believe). The easiest way to do this is to use the catalina ant manager tasks.

Jake

At 11:46 AM 12/17/2002 +0000, you wrote:
Can anybody shed any light on this.

If I add this to my server XML file :-

- <Context path="/shilton" docBase="shilton" debug="5" reloadable="true"
crossContext="true">
  <Resource name="jdbc/shiltonDB" auth="Container"
type="javax.sql.DataSource" />
- <ResourceParams name="jdbc/shiltonDB">
- <parameter>
  <name>factory</name>
  <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
  </parameter>
- <parameter>
  <name>maxActive</name>
  <value>100</value>
  </parameter>
- <parameter>
  <name>maxIdle</name>
  <value>5</value>
  </parameter>
- <parameter>
  <name>maxWait</name>
  <value>100</value>
  </parameter>
- <parameter>
  <name>username</name>
  <value>INTERNET</value>
  </parameter>
- <parameter>
  <name>password</name>
  <value>INTERNET</value>
  </parameter>
- <parameter>
  <name>driverClassName</name>
  <value>com.ibm.as400.access.AS400JDBCDriver</value>
  </parameter>
- <parameter>
  <name>url</name>
  <value>jdbc:as400://NORBERT</value>
  </parameter>
  </ResourceParams>
  </Context>

When I try to publish via a war file Tomcat will not start. If I delete the
war file and publish the folder manually Tomcat starts - have I done
something wrong.

Some notes - I have my test server installed on a WIN2K box and it works ok
- I am using IBM's WSAD 4.0.3 so I presume the files are not published via a
war.

My production box is Linux RH7.2.

Thanks for any input.

Kevin

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

Reply via email to