Java Reference
In-Depth Information
Figure 18-1. Example directory structure
Table 18-1. Directory structure description
Directory
Description
src
Top-level directory that contains all source and configuration files.
src/main
Contains all Java source code and configuration files that are used to create your package. In
this case, we're creating a WAR file.
src/main/
java
Contains server-side Java source code.
src/main/
webapp
Contains servlet configuration files, specifically web.xml .
src/test/
java
Contains Java source code that will be used to run tests on the packaged archive. This code will
not be included within our WAR file.
Deconstructing pom.xml
The pom.xml file provided for each workbook exercise gives the Maven utility information
about how to compile and deploy your Java programs. In our case, Maven will use the in-
formation within the pom.xml file to compile the code within src/main/java , create a WAR
file using the web.xml file within src/main/webapp , deploy the WAR file automatically using
Search WWH ::




Custom Search