You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Patrick Martz <PM...@teltone.com> on 2002/12/09 20:35:11 UTC

Layout/setup for a web-app...help?

Hi all, 
please bear with me as I'm new to the whole web application thing. I
recently
downloaded and installed Tomcat 4.1. After reading all the documentation
I could find, I tried to set it up so that I could run a small web-app, but
I simply
cannot seem to get the web page to access the java servlet.

The details:
I have created a project directory under the root tomcat/webapps directory.
Within that directory is an index.html (which I'm able to successfully
access by http://localhost:8080/myproject/index.html). In the myproject
directory
I have created a "WEB-INF" subdirectory, and a "classes" subdirectory
under that where my servlet.class file resides. I have a web.xml file
in the WEB-INF directory which is essentially empty (doesn't list
any servlet classes).

No matter what link I've tried to put in my index.html to access the 
servlet.class, it always fails to find it. So my question is, what do I need
to do to make this work??? Do I need the servlet class defined in the
web.xml file? If so, how? And if I defined it, what is the relative path
from
the index.html that I need to include? Do I need to make some modifications
to the server.xml file as well? I have been working on this thing
for well over a day and I just can't seem to make it work (no matter how
many examples I mimic or documents I read). Help! :)

Patrick

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Layout/setup for a web-app...help?

Posted by David Brown <dw...@webitplanet.com>.
Patrick Martz writes: 

> Hi all, 
> please bear with me as I'm new to the whole web application thing. I
> recently
> downloaded and installed Tomcat 4.1. After reading all the documentation
> I could find, I tried to set it up so that I could run a small web-app, but
> I simply
> cannot seem to get the web page to access the java servlet. 
> 
> The details:
> I have created a project directory under the root tomcat/webapps directory.
> Within that directory is an index.html (which I'm able to successfully
> access by http://localhost:8080/myproject/index.html). In the myproject
> directory
> I have created a "WEB-INF" subdirectory, and a "classes" subdirectory
> under that where my servlet.class file resides. I have a web.xml file
> in the WEB-INF directory which is essentially empty (doesn't list
> any servlet classes). 
> 
> No matter what link I've tried to put in my index.html to access the 
> servlet.class, it always fails to find it. So my question is, what do I need
> to do to make this work??? Do I need the servlet class defined in the
> web.xml file? If so, how? And if I defined it, what is the relative path
> from
> the index.html that I need to include? Do I need to make some modifications
> to the server.xml file as well? I have been working on this thing
> for well over a day and I just can't seem to make it work (no matter how
> many examples I mimic or documents I read). Help! :) 
> 
> Patrick 
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org> 
> 

Hello Patrick, u r dealing w/ a deployment problem. creating the servlet 
server directory structure by hand is done much more easily using the .war 
file that the tc server will gladly expand for u correctly everytime u 
update ur project and rebuild the .war file. speaking of build u might want 
to look at what the tc gurus have given us in the tc package: look at how 
the /examples webapp was build and deploye using the ant build system which 
is avaiable at the same place at tc: jakarta-tomcat project site. hope this 
helps, david. 


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>