You really need to look at the structure of the other webapps.  For 
instance, look at the "examples" webapp that comes with Tomcat.  Notice 
that it has a WEB-INF directory with "classes" and "lib" directories 
underneath.  That is where servlets go.  Also, the web.xml file goes in 
WEB-INF.  *.jsp files do not go inside the WEB-INF directory.  They go in 
the same places as .html files go.

You should make sure you study existing examples to find patterns on how 
things are set up.  You should also get a servlet book.  I'm sure the first 
chapter would answer most of these questions.

Jake

At 04:27 PM 5/4/2002 -0500, you wrote:
>I am totally new to Tomcat ( and servlets & JSP's in general ). I have
>successfully installed Tomcat but do NOT seem to be able to successfully
>configure a location for my Sevlets and JSP's.
>
>My default "Home" for Tomcat is d:\jbuilder5\jakarta-3.2.1
>
>Currently, if I place a servlet under the directory
>"d:\jbuilder5\jakarta-3.2.1classes" ...it runs fine. I simply
>reference http://localhost:8080/servlet/SomeServletName
><http://localhost:8080/servlet/SomeServletName>  in my browser URL.
>
>JSP's run fine if placed under
>d:\jbuilder5\jakarta-3.2.1\webapps\examples\jsp". I simply
>reference http://localhost:8080/examples/jsp/SomeJSPName.jsp
><http://localhost:8080/servlet/SomeServletName>  in my browser URL.
>
>Both of these are directories created by the Tomcat install process.
>
> >From what I have read, I should be able to modify SERVER.XML file to specify
>a CONTEXT I would like.
>So far NO Success ...I made the entries:
>
>         <Context path="/ServletRoot"
>                  docBase="webapps/ServletRoot"
>                  crossContext="false"
>                  debug="0"
>                  reloadable="true" >
>         </Context>
>
>in SERVER.XML in my attempt to create my own SERVLET location. My
>presumption was that I would create the directory
>ServletRoot under d:\jbuilder5\jakarta-3.2.1\webapps, place my servlet or
>JSP file in this new ( ServletRoot ) directory,
>restart Tomcat and run my servlet using
>http://localhost:8080/ServletRoot/SomeServletName
><http://localhost:8080/ServletRoot/SomeServletName> . or my JSP file using
>http://localhost:8080/ServletRoot/SomeJSPName.jsp.
><http://localhost:8080/ServletRoot/SomeJSPName.jsp.>
>
>This does not work ...all is well though if I put my servlet in the CLASSES
>directory or my new JSP file in the
>d:\jbuilder5\jakarta-3.2.1\webapps\examples\jsp directory !
>
>Any tips on how to structure my own JSP and servlet directories ...Please!!
>
>
>
>
>E-Mail
>[EMAIL PROTECTED]
>

Reply via email to