You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Russell, Steve" <St...@valueoptions.com> on 2001/07/10 17:27:24 UTC

Tip: Using Tomcat Without A Web Server & Setting Up A New WebApp Outside Of The Tomcat Hierarchy

Well, I figure as long as I am on a roll I would also post this other tidbit
that I learned on my own and I am sure other people will want to do.

Anyway, lets just say you want to use Tomcat by itself without a web server.
You also want to set up Tomcat so that it will see *.jsp files and servlets
in the directory of your choice on windows.

I like to keep all of my work in C:\Projects.  It makes everything easy to
find and easy to navigate to on a command line.

I put this line in my server.xml ( Tomcat\conf ) file and rebooted Tomcat:

<Context path="/Projects" docBase="C:/Projects" debug="0"
reloadable="true"/>
        
After I did this Tomcat saw every *.jsp under C:\Projects or its
subdirectories.  Tomcat also saw servlets in C:\Projects\WEB-INF\classes

The URLs for "test.jsp" and "TestServlet" would be:
http://localhost:8080/Projects/servlet/TestServlet
http://localhost:8080/Projects/test.jsp

To make things easy on myself I set my classpath as:

.;C:\Classes

I found this to be very convent for Java.  Just put your Java classes,
beans, packages, jars( unjarred) into C:\Classes and *jsps, servlets, or any
other Java will easily find your java stuff without you having to do more
mucking around with your classpath.

With jdk 1.3.* you can also just drop jars as they are into C:\"jdk
home"\jre\lib\ext

Just be careful when you uninstall the jdk not to throw it out.

Steve

        

Steve Russell

Web Developer III
ValueOptions - Lifescape
703-205-6589
steve.russell@valueoptions.com



**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the sender by email, delete and destroy this message and its 
attachments.


**********************************************************************