Hello,
welcome. I'm not sure I understand the first question in
the context of tomcat. However ant usually puts things
in projectroot/build/classes/x/x/x where project root
is the directory where your src, lib, etc files are.
It also usually copies all the sources to build/src.
As for your webapp. If you want the WEB-INF/web.xml file
to be heeded you must have your OWN webapp (not part of
the examples). To do this create your own subdir
usually /opt/tomcat/webapps/mywebapnamehere and put your WEB-INF
there /opt/tomcat/webapps/mywebapnamehere/WEB-INF. You will need
to add entries to server.xml (see how /examples) is
setup. I generally put my webaps under their own
tomcat subdir for organizational purpose (I don't want
to intermingle with examples)...
if you want to edit the examples to include yours then
you're likely running into the init-param format being
not quite so obvious... EACH param-name,param-value
pair must be surrounded by an <init-param> </init-param>
not all under one. This is a very common problem.
-Andy
-----Original Message-----
From: Matt Campbell
To: [EMAIL PROTECTED]
Sent: 1/28/01 9:56 AM
Subject: Trouble with web.xml
Hi All,
This is my first post to this list, so hi. I've searched all the
documentation
I could find to no avail, I've two problems and I'm looking for some
guidance.
Firstly I'm using Ant and build.xml to set up my web application. This
works
fine except that it does not place the servlets into the classes
directory of
the web application it sets up. When I run build, things seem to go
fine, it
tells me it has compliled the correct number of servlets, but they just
disappear... what is going on?
I have been getting around that by compling using javac with the
destination
directory set to my TOMCAT_HOME/webapps/myapp/WEB_INF/classes directory.
This
all works, my HelloWorld.class servlet runs like a beauty :) My next
problem is
that I cannot get my servlets to recognize web.xml. I place this file
in
WEB-INF directory for the web app, but any init-param I try and use
comes back
as null. I am sure I have the syntax of the web.xml file correct. This
even
happens when I place my servlets in
TOMCAT_HOME/webapps/examples/WEB-INF/classes
directory and edit the pre-existing web.xml file to include my
init-params.
Thanks is advance for any advice.
Cheers
Matt Campbell
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]