C:drive. (The actual location doesn't matter.)
C:\JBuilder5\jdk1.3.1, or wherever jdk1.3.1 is located on your machine. You can set environment variables either in
Settings->ControlPanel->System->Environmentor in a Command Prompt window. When a environment variable is set in a Command Prompt window, that setting applies only to that window.
When setting environment variables, do not use
quotatation marks and do not put spaces around the equal sign when using the
set command in a Command Prompt window. For example, to set
binsubdirectory of the Tomcat directory and run the
startupcommand. In my case,
TOMCAT_HOMEto the Tomcat home directory, in my case to
localhost:8080. (By default Tomcat listens on port 8080.)
examples/servlets/index.html. When Tomcat sees a URL, it consults its
server.xmlfile (which is in
<Context path="/examples" docBase="webapps/examples" crossContext="false" debug="0" reloadable="true" > </Context>
This is a mapping from a URL address path to an internal location.
/examplesas a URL address which should be mapped to a special place on the disk and which may be associated with a Servlet.
webapps/examplesas the place on the disk to associate with the path
<Context>tag tells Tomcat to map
So when the user asks for
Tomcat actually access the file
examplesdirectory as a subdirectory of
examplesdirectory has a
servletssubdirectly, which has an
index.htmlfile in it.
../servlet/HelloWorldExample. On first glance, this looks like it should be referring to a file at
servletdirectory at the top level of a mapped webapp address means: execute the indicated servlet. In this case, execute the servlet called
.classfiles, i.e., compiled
.classfiles for the
examplesweb app is stored in
HelloWorld.javafrom http://archive.corewebprogramming.com/Chapter19.html to anywhere.
HelloWorld.javaand compile it with
Contextentry to the
server.xmlfile. Had we done that, we would have had to restart Tomcat. To restart Tomcat, call
startupagain in the Command Prompt window in which we had originally started Tomcat.)