Example Web Application Overview
The
examples
for this book are packaged as a standard Java web application, as
described in Chapter 2. This file structure is
supported by all Servlet 2.2-compliant servers, so you can use the
example application as a guide when you create your own web
applications. How a web application is installed is not defined by
the specification, however, so it varies between servers. With
Tomcat, you simply copy the file structure to the special
webapps directory and restart the server. To
modify the configuration information for an application, you need to
edit the application’s WEB-INF/web.xml
file using a text editor. Other servers may offer special deployment
tools that copy the files to where they belong and let you configure
the application using a special tool, such as web-based forms.
If you look in the ora web application
directory, you’ll see that it contains an
index.htm
l file and a
number of directories corresponding to chapters in this book. These
directories contain all the example JSP and HTML pages.
There’s also a WEB-INF directory with a
web.xml file, a lib
directory, a classes directory, and a
tlds directory:
The
web.xmlfile contains configuration information for the example application in the format defined by the Servlet 2.2 specification. It’s too early to look at the contents of this file now; we will return to parts of it when needed.The
libandclassesdirectories are standard directories, also defined by the Servlet 2.2 specification. ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access