A) Basic servlet setup:
Optional: You can change the port on which Tomcat is listening for incoming http connections by modifying the "port" property for "Connector" item in server.xml. In the example below, the port is changed to 9999 -- please, do not use 9999 :).
<!-- Define a non-SSL Coyote HTTP/1.1 Connector on port 9999 -->
<Connector port="9999" protocol="HTTP/1.1"
maxThreads="150" connectionTimeout="20000"
redirectPort="8443" />
The comments in your "server.xml" file are very helpful. Please, read them!
You also need to change the control port here:
<Server port="8005" shutdown="SHUTDOWN" debug="0">
cp -r /stage/classes/current/51024-1/pub/hello $CATALINA_HOME/webapps/
http://localhost:port/
to check that you started Tomcat. Then go to:
http://localhost:8080/hello/HelloWorldExample
The servlet should display your name.
B) Simple Browser/Servlet
communication
cp -r /stage/classes/current/51024-1/pub/simple-get $CATALINA_HOME/webapps/
Once you have the JDBC driver classes in the CLASSPATH built for your servlet engine, accessing an Oracle database should work fine. Documentation on classpaths for servlets can be found here.
Before you go further, make sure you have read the class loader information above! You should check the following directories and look for the ojdbc*.jar file.
$CATALINA_HOME/lib $CATALINA_HOME/lib/*.jar If you don't have the odbc*.jar file in any of the directories above, you will have to put it under one of the following directories.
/WEB-INF/classes of your web application /WEB-INF/lib/*.jar of your web application Remember that you have limited network drive capacity so you should NOT directly copy it. Instead, try creating a symbolic link using ln -s. See the man page of ln for details. The jdbc driver classes are located at:
/stage/classes/current/51024-1/ojdbc
D) To use Tomcat's Application Manager:
http://{host}:{port}/manager/{command}?{parameters}