You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Lawrence, Gareth" <G....@massey.ac.nz> on 2002/03/27 04:01:58 UTC

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:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>


Re: Deployment [Newbie]

Posted by Nikola Milutinovic <Ni...@ev.co.yu>.
> 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

"classes" and "lib" should be under WEB-INF.

> 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>

You lack <servlet-class> tags, so Tomcat would know which class to use to instantiate this servlet.

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

So, URL: ${URL_BASE}/graph will invoke "graph" servlet - OK. "URL_BASE" depends on your webapp deployment path (defined in server.xml as Context).

> But do I really need to specify each servlet in the web.xml?

Yes, each servlet has to be declared separately.

>  What do I need
> to do to make the folder accessible (like examples :-))?  Or can you direct
> me to a good tutorial on deployment.  

"Folder"? You mean webapp? Well, in Tomcat's nomenclature, each webapp is called "Context" and is defined with <Context ...> tag(s), within a virtual host (<Host ...> tag). This is in server.xml

Nix.