Tomcat Server

Tomcat is not too hard to get up and running. I suggest looking at Marty Hall's tutorial for setup..

When it is running, it looks like this. The application also provides you with examples for Servlets and JSPs .
         (But note that these say that the code is not complete in these examples).

Below are two examples of the directory structure used in Tomcat. The first is from the Murach book on Servlets and JSPs using Tomcat, and the second is from the Tomcat notes given with Tomcat. Finally, at the end of the page is a gif from the J2EE tutorial in the Java Web Server.

For submission of the labs, you should either have your code working on the ecst server OR provide me with a .war file that can easily be placed in the webapps directory on my machine and provide me with a webpage to call it (i.e., tell me exactly what to do to start it - if I need to do things for a database, etc be very explicit. If explicit directions are not given, I assume you have an index.html in the .war file and that I should be able to start it with simply the name of your .war file from my server).


Here is a snapshot of the directory structure for an example application of a Music Store(courtesy of the Murach book)

Description


Finally, here is the gif from the J2EE sun tutorial

Note also:
A web module can be deployed as an unpacked file structure or can be packaged in a JAR file known as a web archive (WAR) file. Because the contents and use of WAR files differ from those of JAR files, WAR file names use a .war extension. The web module just described is portable; you can deploy it into any web container that conforms to the Java Servlet Specification.

To deploy a WAR on the J2EE Application Server, the file must also contain a runtime deployment descriptor. The runtime deployment descriptor is an XML file that contains information such as the context root of the web application and the mapping of the portable names of an application's resources to the Application Server's resources. The Application Server web application runtime DD is named sun-web.xml and is located in /WEB-INF/ along with the web application DD. The structure of a web module that can be deployed on the Application Server is shown in the above figure.