Simple Web App

From DojoWiki

Jump to: navigation, search

First find where you installed Tomcat on your system.

Perhaps c:\Program Files\Apache-Tomcat or /usr/local/apache-tomcat

Underneath that directory, there is a /webapps folder.

The Java Servlet's Specification describes the directory structure of a web application.

Create a directory under the webapps folder... That will be your application root (http://localhost:8080/yourapp)

webapps/yourapp
 + WEB-INF
   + classes
   + lib
   - web.xml
 - index.jsp

For the time being, the web.xml file can contain just :

<web-app>
 <display-name>A Simple Web Application</display-name>
 <session-timeout>30</session-timeout>
</web-app>

The index.jsp can be a straight-forward html page

 <html><body>Hello!</body></html>

Check http://localhost:8080/manager to see if the new application is listed.

Personal tools