J2Ee/Jee (Java 2 Enterprise Edition) Technology
J2Ee/Jee (Java 2 Enterprise Edition) Technology
Main references
[1] Prentice Hall Ptr Java(Tm) Ee 5 Tutorial, The (3Rd Edition) (The
Java Series)
[2] Java EE 5 Technologies & Specifications
Other references
[3] http://java.sun.com
[4] www.theserverside.com
[5] http://groups.google.com.vn/group/uit_j2ee/
The j2ee subject’s resources (Content, Slides, Exercises,
Books, Ref, …)
Exams
An Introduction to
J2EE/JEE technology
What Is Java EE?
Application Assembler
Assembles EJB JAR and WAR files created in the previous phases into
a Java EE application (EAR) file
Specifies the deployment descriptor for the Java EE application
Verifies that the contents of the EAR file are well formed and comply
with the Java EE specification
Application Deployer and Administrator
Deploys/installs the Java EE application EAR file into the Java EE
server
Server, tools – Apache Tomcat
EJB container
No Business
Session Entity
Logic
Bean Bean
Web container
Presentation Logic JSP HTML/XML
Serlvet
http://tomcat.apache.org/
Server, tools – Jboss 4.0 or later
EJB container
Business
Session Entity
Logic
Bean Bean
Web container
Presentation JSP HTML/XML
Logic Serlvet
http://jboss.org/
Server, tools – BEA-Weblogic
EJB container
Business
Session Entity
Logic
Bean Bean
Web container
Presentation JSP HTML/XML
Logic Serlvet
The --verbose flag causes all logging and debugging output to appear on the
terminal window or command prompt (it will also go into the server log,
which is located in <JAVAEE_HOME>/domains/domain1/logs/server.log).
Sun Java System Application Server
Reference to:
Prentice Hall Ptr Java(Tm) Ee 5 Tutorial, The (3Rd Edition) (The Java Series)
Chapter no.2 (Getting start with web applications)
About This Tutorial → About the Examples
In the Java EE architecture, web components and static web content files
such as images are called web resources. A web module is the smallest
deployable and usable unit of web resources. A Java EE web module
corresponds to a web application as defined in the Java Servlet
specification.
Web modules
You package a web module into a WAR by using the ant utility, or
by using the IDE tool of your choice
To build the hello1 application with NetBeans 5.5, follow these instructions
6. In the Projects tab, right-click the hello1 project and select Build Project.
Packaging web modules
To build the hello1 application using the ant utility, follow these steps
2. Run ant. This target will spawn any necessary compilations, copy files to the
<INSTALL>/javaeetutorial5/examples/web/hello1/build/ directory, create the WAR file, and copy
it to the <INSTALL>/javaeetutorial5/examples/web/hello1/dist/ directory
Deploying a WAR file
You can deploy a WAR file to the Application Server in a few ways:
• Copying the WAR into the
<JavaEE_HOME>/domains/domain1/autodeploy/ directory.
• Using the Admin Console.
• By running asadmin or ant to deploy the WAR.
• To deploy or undeploy a WAR with asadmin, open a terminal
window or command prompt and execute:
asadmin deploy full-path-to-war-file
asadmin undeploy context_root
Testing Deployed Web Modules
http://localhost:8080/hello1