Hi :-)

Firstly you need to add the following entry to the
TOMCAT_HOME/conf/server.xml file, setting the values for the path and
docBase to the name of your web application. 

<Context path="/groupa" docBase="groupa" debug="0" reloadable="true" />

That's the first step and then you'll be able to copy html files into the
groupa folder.

Your default web.xml file will look like:

<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/j2ee/dtds/web-app_2_3.dtd";>

<web-app>
</web-app>

And then for each servlet you'll need to add:

<servlet>
  <servlet-name>ExampleServlet</servlet-name>
  <servlet-class>packagename.ExampleServlet</servlet-class>
  <init-param>
   <param-name>parameter</param-name>
   <param-value>value</param-value>
  </init-param>
  <load-on-startup>1</load-on-startup>
</servlet>

and copy the servlet class into the /WEB-INF/classes folder.

This should get you started (without needing a long book - although they can
be very exciting reading :-))

:-) Lol :-)

G.

-----Original Message-----
From: Lawrence, Gareth [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, 27 March 2002 3:02 p.m.
To: '[EMAIL PROTECTED]'
Subject: Deployment [Newbie]


Greetings All,

Got tomcat going well on linux, but deployment is giving me a headache :-((

I'm looking at the documentation and the example web.xml file and I'm not
sure what I need to do to set up a webapp ???

I've got my folder in webapps: groupa

Directory Structure:
        groupa
                WEB-INF 
                        classes
                        lib

So I think its the web.xml file I'm not sure on :-(  I'm looking at the
example one and it isn't helping ....

I see the servelet configuration stuff:
<servlet>
      <servlet-name>graph</servlet-name>
      <description>
      </description>
    </servlet>

<servlet-mapping>
      <servlet-name>graph</servlet-name>
      <url-pattern>/graph</url-pattern>
    </servlet-mapping>

But do I really need to specify each servlet in the web.xml?  What do I need
to do to make the folder accessible (like examples :-))?  Or can you direct
me to a good tutorial on deployment.  

Thanx heaps,
Gareth

--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>

--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>

Reply via email to