J2EE Application Deployment

decorumgroveInternet and Web Development

Aug 7, 2012 (5 years and 15 days ago)

268 views

1

Chapter 16:

J2EE Application Deployment

Reference: Building J2EE Apps with WebSphere

2

Objectives


J2EE Packaging and Archive files


WSAD (Application Developer IDE)


Import EAR or WAR


Export EAR or WAR


WAS (WebSphere Application Server)


Start / Stop WAS Server


Administrative Console



3

J2EE Packaging into Archive
Files

4

WSAD: Import EAR or WAR


Enterprise projects archived as an
EAR

file


May contain Web, EJB and Application client
projects


Web projects archived as a
WAR

file


When importing to WSAD, an Enterprise
(EAR) project must be defined.

5

Importing CalcWeb.war


Steps:


Add a Web Project


Import WAR file


WSAD Web project
packaging:


JSPs

under
WebContent


servlets

under
JavaSource


libraries

(e.g.,
calculator
-
lib.jar) under
WebContent/WEB
-
INF/lib


Reference: pages 349


352


6

Running Calculator Web Application


Start with index.html


Click
Calculator

button


Server Debugging
Views


Console


Servers


Debug


Variables


7

Exporting Web Projects


Reference: Page 353
-

356


Web Projects can be exported as


WAR file


In
Web Perspective


Right
-
click Web project and select Export


WAR file is a structured JAR file (zip file)


Can view the contents using WinZip


EAR file


preferred for WSAD (creates Web project when importing)


E.g., CalcApp EAR project


In
J2EE Perspective


Right
-
click EAR project and select Export



8

Configure Local Server


Reference: Pages 357
-

358


Server Perspective


Add EAR projects


E.g., CalcApp


Remove EAR projects


E.g., DefaultEAR


You can configure a remote server if you have
WebSphere Application Server (WAS)
.


WAS administration and remote server configuration
are
not

covered in this course


Skip pages 358


361.

9

Enterprise Application Deployment


WAS 5.0 Administration Console


http://localhost:
9090
/admin


Install an application


Start an application


Running an application


Lab 5:


Deploy CalcApp.ear or GolfJsp.ear


http://doon
-
1c09
--
b01
-
:
9080
/CalcWeb/


http://doon
-
1c09
--
b01
-
:
9080
/GolfProject/

10

WebSphere Administrative Console

11

Lab 5