Class 2 |
Intermediate Java 30-IT-397 |
|
Installing Tomcat
-
Go to the Tomcat home page, http://jakarta.apache.org/tomcat/index.html.
-
Specifically, go to http://jakarta.apache.org/builds/jakarta-tomcat-4.0/release/v4.0.6/bin/.
-
Download jakarta-tomcat-4.0.3.exe . Double click it to run it.
-
Once you have installed it, choose Start Tomcat from the installation directory.
-
Then, you can open up a browser and go to http://localhost:8080/
-
You've now turned your box into a web server. The index page will
appear, complete with links to example JSPs and Servlets. The source
is included, so you have a great place to start! Take a look at those
if you ever need assistance.
-
Where do you put your JSPs and servlets?
-
Take a look at the directories for the examples and follow that.
-
For the examples, JSPs are located in webapps\examples\jsp\ from the installation
directory.
-
Servlets are located in webapps\examples\web-inf\classes\
-
You can add subdirectories/packages from the root. You'll just need
to change that in the URL. You can also make an application directory
instead of /examples/ and use that. Again, you'll need to chage that
in the URL. Note that examples all have /examples/ in the URL.
-
Go through some of the examples to see how they work. Note the URL,
and how it maps to the directories (above).

Created by: Brandan Jones
December 17, 2001