|
ANT |
|
In the .ear file .war, .jar and application.xml
file are packaged in the above format.
Enterprise Archive Contents
Web component follows the standard
directory structure defined in the JEE
specification.
Directory Structure of Web Component
/
index.htm, JSP, Images etc..
Root directory of the web archive (‘.war’ file)
contains all the html, jsp, images files and the
additional directories containing these files. In
the root directory there is a special directory
‘WEB-INF’ which contains the web
deployment descriptor (web.xml), classes and
the lib directory.
Directory Structure of Example2 directory
After understanding the structure of .ear and
.war file let’s look at the directory structure of
example2 directory where we have work to
develop the deployable .ear file.
Directory structure:
|
|
Description of Directory and its content:
Directory |
Description |
example2 |
Base directory which contains
build.xml and the .ear file
generated by Ant utility will be
placed here. |
build |
Various files generated by Ant
utility will be placed in
different directories under
this directory. |
build/
deploymentdesciptors |
Web.xml and application.xml
files are placed in this
directory. |
build/ear |
Intermediate files for the
assembling of example2.ear ear
file are placed here.build/jar
Any jar file if required will be
placed in this directory. |
build/war |
Intermediate files for the
assembling of example2.war
ear file are placed here. |
build/src |
All the compiled .class files are
placed in this directory. |
src |
All the java source files are
placed here. |
web |
All the html,jsp, images etc.
files are placed in this directory. |
Here we are creating HelloWorld.java and
index.jsp which is in the /src and /web
directory respectively.
Source code of HelloWorld.java:
import java.io.*;
import java.text.*;
import java.util.*;
import javax.servlet.*;
import javax.servlet.http.*;
public class HelloWorld extends HttpServlet {
|
|
|
Dec 2007 | Java Jazz Up |37 |
|
|
|
View All Topics |
All Pages of this Issue |
Pages:
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
38,
39,
40,
41,
42,
43,
44,
45,
46,
47,
48,
49,
50,
51,
52,
53 ,
54,
55,
56,
57,
58,
59,
60,
61,
62,
63 ,
64,
65 ,
66 ,
67 ,
68 ,
69 ,
70 ,
71 ,
72 ,
73 ,
74 ,
75 ,
76 ,
77 ,
78 ,
79 ,
80 ,
81 ,
82 , Download PDF |
|
|
|
|
|
|