Java Reference
In-Depth Information
Example 23.6
Sample
web.xml
file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app PUBLIC
"-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<servlet>
<servlet-name>SessionServlet</servlet-name>
<display-name>Simple Session Servlet</display-name>
<servlet-class>com.jadol.budgetpro.SessionTestServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>SessionServlet</servlet-name>
<url-pattern>/servlet/test</url-pattern>
</servlet-mapping>
<session-config>
<session-timeout>0</session-timeout>
</session-config>
</web-app>
a directory structure that mirrors the structure of the JARs that you are build-
ing. But that arrangement is often not helpful for source management purposes.
It is therefore not uncommon to have a source tree that reflects the project
structure and a separate build directory that mirrors the JAR file directory lay-
out. As classes are compiled, the class files are copied into the build directory
along with copies of the XML, JSP, and other files. As a last step in the build
process, the build directories are “jarred up” into WAR/JAR/EAR files.
23.3
D
EPLOYING THE
EAR
Deploying means getting your file(s) into the right place and dealing with the
Web server to get your application up and running. For EJBs this includes the