Hints on making Java servlets work ********************************** Note: This is just one possibility, others may work too. 1. Download and install TomCat 4.0 from http://java.sun.com/products/servlet/download.html In their words: "TomCat is the Reference Implementation for the Java Servlet 2.2 and JavaServer Pages (JSP) 1.1 Technologies." Documentation on TomCat you can find from http://java.sun.com/docs/books/tutorial/servlets/index.html An example of an online bookstore implementation using Java servlets can be found there. To run your own examples, you should place them under the "webapps" subdirectory of TomCat. 2. Make sure your java PATH is correctly set. Do not forget to set up the DSN to your database and do the SQL server registration (as in Project #2) 3. Set JAVA_HOME=d:\app\jdk1.3 (on machines in the CS labs) Set CLASSPATH= \bin\servlet.jar 4. For the purposes of this assignment you do not need to place your files on the server - the local machine would be fine. But make sure you delete them at the end of the day, so that your work does remain yours. Run "startup" from the "bin" subdirectory of TomCat. This starts a pseudo web server on your local host machine using port 8080. To make sure all is ok, you may open up a browser and type http://localhost:8080/ A sample TomCat page should appear, which if the server was not started, would not be there. Note: To stop the web server at anytime, run "shutdown". If you try to refresh the browser after you have stopped the server, an error should be reported. In particular you would need to shutdown and restart the server after you make changes to your servlet code in order to incorporate them. 5. Look at the Bookstore example and understand it well. Use ideas from http://home.att.net/~baldwin.rick/Advanced/Java682.htm to create your own HTML forms. 6. To register your servlets with the (locally running) web server, you need to create your own web.xml file (similar to the one in the Bookstore example) and place it in your own directory (under "webapps"). And yes - you need to be able to read some XML to do this :-) 7. Once you have the HTML forms ready and the servlets implemented and registered, your Web interface to the database will be ready to run. In the end it should look very similar to what you did in Project #2 in order to connect to the database.