Building and Deploying a Simple Web Application
Tomcat and JSP Tomcat is an application server, commonly used to host JSP applications Applications are “Deployed” on a Tomcat server using a web based interface. The applications reside in the Tomcat user space, not in the author’s user space
WAR Files Applications are typically deployed as a single WAR file. The WAR format is a zipped archive containing a specific hierarchy of folders.
WAR File Structure Resource files (JSP files) Java class files (in normal package hierarchy) Web.xml
Deploying on Tomcat
A simple JSP
The Java Class…
The result… beginHello Worldend
More Complexity – Accessing a Database Trick – make sure the database driver jar is in your application space! Put your jar file in here!
The JSP