SlideShare a Scribd company logo
1 of 19
Download to read offline
Instructor Exercises Guide
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
© Copyright IBM Corp. 2004, 2007 Exercise 13. Package and Deploy a J2EE Application 13-1
V4.1
EXempty Exercise 13.Package and Deploy a J2EE
Application
Estimated Time
00:30
What This Exercise Is About
This exercise takes the library application that has been developed
and tested in IBM Rational Application Developer and exports it for
deployment on a server.
What You Should Be Able to Do
At the end of the lab, you will be able to:
• Package an application as an EAR file and export it from the IBM
Rational Application Developer environment
• Install the EAR file on IBM WebSphere Application Server
• Test the application on a browser
Introduction
The integrated development environment of IBM Rational Application
Developer has many advantages, not the least of which is the
behind-the-scenes aspect of testing. This means that Run on Server
will automatically deploy and install code, open a browser, and run a
Web application. However, a completed application will need to be
packaged, exported from this environment, and installed on a remote
server.
This exercise simulates this process. Although the server is the same
local server that has been used for testing, it is in fact a stand-alone
WebSphere Application Server that can be used outside of the
Rational Application Server environment. In this exercise, you will
export the Web application (packaged in an EAR file), then use the
WebSphere Application Server Administrative console to install and
configure it. Finally, you will test it using an external browser.
Instructor Exercises Guide
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
13-2 Developing Web Applications © Copyright IBM Corp. 2004, 2007
Required Materials
This exercise requires the database to be set up in a specific way
using files that can be found in the <LAB_FILES>Deployimports
directory. Make sure you have these files before starting the lab.
Instructor Exercise Overview
It is difficult to create a truly real-life situation when the only environment available is a
standalone computer! Before students begin this exercise, draw diagrams on the
whiteboard showing how the single environment of Rational Application Developer
development becomes the multiple environment of deployment. Here is an example:
All the required steps are simple, and students will have done many of them several times
during the week. It is therefore very important to set the scene and explain exactly why they
are doing this exercise.
Instructor Exercises Guide
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
© Copyright IBM Corp. 2004, 2007 Exercise 13. Package and Deploy a J2EE Application 13-3
V4.1
EXempty Exercise Instructions
Preface
The following references in the exercise instructions represent directory locations in your
workstation:
• <LAB_FILES>: C:LabFiles70
• <SDP_DIR>: C:IBMSDP70
Instructor Exercises Guide
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
13-4 Developing Web Applications © Copyright IBM Corp. 2004, 2007
13.1. Prepare the Workspace
If you skipped previous labs, specifically labs 1-4, perform the following instructions:
__ 1. Start IBM Rational Application Developer.
__ a. In the Workspace Launcher dialog, specify <LAB_FILES>workspace as the
new workspace directory.
__ b. Click OK to open the workspace.
__ c. Import the <LAB_FILES>ProfilesolutionProfileSolution.zip project
interchange file. If you need assistance, refer to the instructions in the Appendix,
Install the Library Application in a New Workspace.
Instructor Exercises Guide
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
© Copyright IBM Corp. 2004, 2007 Exercise 13. Package and Deploy a J2EE Application 13-5
V4.1
EXempty 13.2. Reset the Database
In the previous lab, the Library database was populated in a specific way to demonstrate
profiling. Now it needs to be set back to its original state. If you skipped the profiling lab,
you can skip to section 13.3.
__ 2. Ensure that the WebSphere Application Server is stopped.
__ a. In the Servers view, right-click WebSphere Application Server v6.1 and select
Stop.
__ 3. Import new database configuration files to reset the database default value.
__ a. In the Project Explorer, right-click LibraryDatabaseSetup and select Import.
__ b. Select File System in the Import dialog, then click Next.
__ c. In the From Directory field, browse to <LAB_FILES>Deployimports.
__ d. Click Select All to select all files in the imports folder.
__ e. Select Overwrite existing resources without warning. Also make sure the
Into folder is set to LibraryDatabaseSetup.
Instructor Exercises Guide
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
13-6 Developing Web Applications © Copyright IBM Corp. 2004, 2007
__ f. Click Finish.
__ 4. Recreate the database.
__ a. In the Project Explorer, expand LibraryDatabaseSetup driver.
__ b. Right-click SetUpLibraryDatabase.java and select Run As Java
Application.
__ c. The following messages should be shown in the Console view.
Drop existing tables (if they exist)
SQL Executed with no errors:
SQL Executed with no errors:
SQL Executed with no errors:
SQL Executed with no errors:
SQL Executed with no errors:
SQL Executed with no errors:
Create the library tables
SQL Executed with no errors:
SQL Executed with no errors:
SQL Executed with no errors:
SQL Executed with no errors:
SQL Executed with no errors:
SQL Executed with no errors:
Load the item table
A total of 6 records were processed
There were 6 rows added without errors
There were 0 warnings and 0 errors
Load the patron table
A total of 6 records were processed
There were 6 rows added without errors
There were 0 warnings and 0 errors
Load the copy table
A total of 13 records were processed
There were 13 rows added without errors
There were 0 warnings and 0 errors
Load the onloan table
A total of 6 records were processed
There were 6 rows added without errors
There were 0 warnings and 0 errors
Instructor Exercises Guide
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
© Copyright IBM Corp. 2004, 2007 Exercise 13. Package and Deploy a J2EE Application 13-7
V4.1
EXempty Load the tablemax table
A total of 3 records were processed
There were 3 rows added without errors
There were 0 warnings and 0 errors
Instructor Exercises Guide
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
13-8 Developing Web Applications © Copyright IBM Corp. 2004, 2007
13.3. Package the EAR File
__ 5. Export the LibraryEAR project as library.ear file.
__ a. In the Project Explorer view, right-click LibraryEAR, and select Prepare for
Deployment.
__ b. In the Project Explorer view, right-click LibraryEAR, and select Export EAR
file.
__ c. In the EAR Export dialog, select LibraryEAR as the EAR application, and
browse to <LAB_FILES>Deployexportslibrary.ear for the Destination.
__ d. Click Finish.
__ e. You should now be able to locate the library.ear file in the
<LAB_FILES>Deployexports directory.
Instructor Exercises Guide
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
© Copyright IBM Corp. 2004, 2007 Exercise 13. Package and Deploy a J2EE Application 13-9
V4.1
EXempty 13.4. Start the server and Administrative Console
__ 6. Remove projects from the server.
__ a. In the Servers view, expand WebSphere Application Server v6.1, right-click
LibraryEAR, and select Remove.
__ b. Click OK in the confirmation dialog.
__ 7. Start the server.
__ a. In the Servers view, right-click WebSphere Application Server V6.1, and select
Start.
__ b. Switch to the Servers view and wait for the server status to change to Started.
__ 8. Start administrative console.
__ a. Right-click WebSphere Application Server V6.1 from the Servers view, then
select Run administrative console to load the administrative console in a Web
browser.
__ b. Type admin in the User ID field, and click Log in.
Instructor Exercises Guide
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
13-10 Developing Web Applications © Copyright IBM Corp. 2004, 2007
13.5. Install the Enterprise Application
__ 9. Install Library Enterprise Application to the application server (server1).
__ a. In the Admin Console, expand Applications in the left navigation, and click
Install New Application.
__ b. In the Preparing for the application installation page, select Local file
system and click Browse. Navigate to the <LAB_FILES>deployexports
directory where the library.ear was saved in the previous step. Select
library.ear and click Open. The Local file system field should now contain the
path of the EAR file.
__ c. Click Next.
__ d. The next page will show Step 1: Select installation options. On the left side
menu, notice that there are three steps to complete. You can complete each step
Instructor Exercises Guide
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
© Copyright IBM Corp. 2004, 2007 Exercise 13. Package and Deploy a J2EE Application 13-11
V4.1
EXempty in turn and press Next to navigate to the next step, or you can jump directly to a
step by clicking on its link.
__ e. In Step 1, select the check box to enable Pre-compile JSP. This operation takes
a little while to complete, but is an excellent option to select when testing. This
way you can ensure that all JSPs will compile. In production, this is a way to
Instructor Exercises Guide
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
13-12 Developing Web Applications © Copyright IBM Corp. 2004, 2007
reduce the response time for the first request of a JSP page. Change the
Application name to LibraryApplication. Click Next.
__ f. Step 2 will now be displayed. Notice that Step 1 is still listed as a hyperlink,
allowing you to return to any previous step. Step 2 allows you to map modules
Instructor Exercises Guide
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
© Copyright IBM Corp. 2004, 2007 Exercise 13. Package and Deploy a J2EE Application 13-13
V4.1
EXempty that are contained in your application. You have only one module, LibraryWeb,
which has already been configured to deploy to server1. Click Next.
__ g. Step 3 displays a summary of the configurations set in the previous steps. Verify
the information, then click Finish.
__ h. You should see a page headed Installing, and messages will scroll down to
indicate the progress of the installation. The application server will step through
Instructor Exercises Guide
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
13-14 Developing Web Applications © Copyright IBM Corp. 2004, 2007
the module to performing installation tasks. Look for the following message to
confirm that the enterprise application was successfully installed.
Instructor Exercises Guide
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
© Copyright IBM Corp. 2004, 2007 Exercise 13. Package and Deploy a J2EE Application 13-15
V4.1
EXempty 13.6. Start the Enterprise Application
Before you can test the application, you must start the LibraryApplication.
__ 10. Start the Library enterprise application.
__ a. In the Admin Console, expand Applications, and click Enterprise
Applications. The page displayed in the workspace lists the enterprise
applications installed, and indicates whether they are started or stopped.
__ b. Select the check-box next to LibraryApplication and Click Start. This will
attempt to start the LibraryApplication enterprise application.
__ c. Once completed, look for a message at the top of the screen indicating that
LibraryApplication started successfully.
__ d. Scroll down to the list of enterprise applications table, and you should also see
that LibraryApplication has a status of Started.
Note
If an error is reported, use the command prompt to change to the
<SDP_DIR>runtimesbase_v61profilesAppSrv01logsserver1 directory and display
the contents of SystemOut.log. Scroll down to the bottom of the file to see the latest
messages. This should provide more information about the error. Verify that you followed
all of the above steps correctly, and try restarting the server if you still experience
problems.
Instructor Exercises Guide
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
13-16 Developing Web Applications © Copyright IBM Corp. 2004, 2007
13.7. Test the Library Application
__ 11. Test the Servlet.
__ a. In the J2EE perspective, click the Web browser icon.
__ b. In the Web browser, enter the address http://localhost:9080/Library/List. A list
of all the patrons and their on loan items should be displayed.
__ 12. Test the JSP pages.
__ a. In the Web browser, specify the address
http://localhost:9080/Library/search.jsp.
Instructor Exercises Guide
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
© Copyright IBM Corp. 2004, 2007 Exercise 13. Package and Deploy a J2EE Application 13-17
V4.1
EXempty __ b. Type 4 in Search Phrase, select Patron ID, and click Search.
__ c. The list of items for that patron should be displayed.
__ 13. Test the Struts pages.
__ a. Type http://localhost:9080/Library/login.jsp in the browser
address to go to a login page.
__ b. Type 2 in User ID and vogel in Password, then click Login.
Instructor Exercises Guide
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
13-18 Developing Web Applications © Copyright IBM Corp. 2004, 2007
__ c. The following page should show upon a successful login.
__ 14. Test the JSF pages.
__ a. Type http://localhost:9080/Library/faces/register.jsp in the
browser address to load the Register A New Patron page.
__ b. Enter the following information, then click Register.
- First Name: Jimmy
- Last Name: World
- Email: jv@ibm.com
- Password: donuts
__ c. The registration successful page should now show, with a random ID generated
for the patron.
Instructor Exercises Guide
Course materials may not be reproduced in whole or in part
without the prior written permission of IBM.
© Copyright IBM Corp. 2004, 2007 Exercise 13. Package and Deploy a J2EE Application 13-19
V4.1
EXempty END OF LAB

More Related Content

What's hot

Installing the oracle bi mobile app designer
Installing the oracle bi mobile app designerInstalling the oracle bi mobile app designer
Installing the oracle bi mobile app designerRavi Kumar Lanke
 
Sharepoint 2010 mcq
Sharepoint 2010 mcqSharepoint 2010 mcq
Sharepoint 2010 mcqAnuja Sharma
 
EMC Documentum xCP 2.2 Self Paced Tutorial v1.0
EMC Documentum xCP 2.2 Self Paced Tutorial v1.0EMC Documentum xCP 2.2 Self Paced Tutorial v1.0
EMC Documentum xCP 2.2 Self Paced Tutorial v1.0Haytham Ghandour
 
Bca sem 5 c# practical
Bca sem 5 c# practicalBca sem 5 c# practical
Bca sem 5 c# practicalHitesh Patel
 
Module 2: Managing Work Items in Rational Team Concert
Module 2: Managing Work Items in Rational Team ConcertModule 2: Managing Work Items in Rational Team Concert
Module 2: Managing Work Items in Rational Team ConcertIBM Rational software
 
Tutorial: Create a custom work item in Rational Team Concert
Tutorial: Create a custom work item in Rational Team ConcertTutorial: Create a custom work item in Rational Team Concert
Tutorial: Create a custom work item in Rational Team ConcertBill Duncan
 
An IT Pro Guide to Deploying and Managing SharePoint 2013 Apps
An IT Pro Guide to Deploying and Managing SharePoint 2013 AppsAn IT Pro Guide to Deploying and Managing SharePoint 2013 Apps
An IT Pro Guide to Deploying and Managing SharePoint 2013 AppsRandy Williams
 
Create software builds with jazz team build
Create software builds with jazz team buildCreate software builds with jazz team build
Create software builds with jazz team buildBill Duncan
 
Application engine
Application engineApplication engine
Application engineJAYAARC
 
Configure an Integrated Exchange, Lync, and SharePoint Test Lab
Configure an Integrated Exchange, Lync, and SharePoint Test LabConfigure an Integrated Exchange, Lync, and SharePoint Test Lab
Configure an Integrated Exchange, Lync, and SharePoint Test LabVinh Nguyen
 
Cis407 a ilab 7 web application development devry university
Cis407 a ilab 7 web application development devry universityCis407 a ilab 7 web application development devry university
Cis407 a ilab 7 web application development devry universitylhkslkdh89009
 

What's hot (18)

Installing the oracle bi mobile app designer
Installing the oracle bi mobile app designerInstalling the oracle bi mobile app designer
Installing the oracle bi mobile app designer
 
Sharepoint 2010 mcq
Sharepoint 2010 mcqSharepoint 2010 mcq
Sharepoint 2010 mcq
 
Lab1 RTC Overview
Lab1 RTC OverviewLab1 RTC Overview
Lab1 RTC Overview
 
xCP 2.1 Developer Guide
xCP 2.1 Developer GuidexCP 2.1 Developer Guide
xCP 2.1 Developer Guide
 
190 957
190 957190 957
190 957
 
EMC Documentum xCP 2.2 Self Paced Tutorial v1.0
EMC Documentum xCP 2.2 Self Paced Tutorial v1.0EMC Documentum xCP 2.2 Self Paced Tutorial v1.0
EMC Documentum xCP 2.2 Self Paced Tutorial v1.0
 
Bca sem 5 c# practical
Bca sem 5 c# practicalBca sem 5 c# practical
Bca sem 5 c# practical
 
Module 2: Managing Work Items in Rational Team Concert
Module 2: Managing Work Items in Rational Team ConcertModule 2: Managing Work Items in Rational Team Concert
Module 2: Managing Work Items in Rational Team Concert
 
Tutorial: Create a custom work item in Rational Team Concert
Tutorial: Create a custom work item in Rational Team ConcertTutorial: Create a custom work item in Rational Team Concert
Tutorial: Create a custom work item in Rational Team Concert
 
DEVICE CHANNELS
DEVICE CHANNELSDEVICE CHANNELS
DEVICE CHANNELS
 
An IT Pro Guide to Deploying and Managing SharePoint 2013 Apps
An IT Pro Guide to Deploying and Managing SharePoint 2013 AppsAn IT Pro Guide to Deploying and Managing SharePoint 2013 Apps
An IT Pro Guide to Deploying and Managing SharePoint 2013 Apps
 
Create software builds with jazz team build
Create software builds with jazz team buildCreate software builds with jazz team build
Create software builds with jazz team build
 
Rational team concert (RTC) tips
Rational team concert (RTC) tipsRational team concert (RTC) tips
Rational team concert (RTC) tips
 
Application engine
Application engineApplication engine
Application engine
 
Custom JSF components
Custom JSF componentsCustom JSF components
Custom JSF components
 
Tutorial for netbeans
Tutorial for netbeansTutorial for netbeans
Tutorial for netbeans
 
Configure an Integrated Exchange, Lync, and SharePoint Test Lab
Configure an Integrated Exchange, Lync, and SharePoint Test LabConfigure an Integrated Exchange, Lync, and SharePoint Test Lab
Configure an Integrated Exchange, Lync, and SharePoint Test Lab
 
Cis407 a ilab 7 web application development devry university
Cis407 a ilab 7 web application development devry universityCis407 a ilab 7 web application development devry university
Cis407 a ilab 7 web application development devry university
 

Viewers also liked

SE2016 Java Alex Theedom "Java EE revisits design patterns"
SE2016 Java Alex Theedom "Java EE revisits design patterns"SE2016 Java Alex Theedom "Java EE revisits design patterns"
SE2016 Java Alex Theedom "Java EE revisits design patterns"Inhacking
 
Servlet and jsp interview questions
Servlet and jsp interview questionsServlet and jsp interview questions
Servlet and jsp interview questionsSujata Regoti
 
Java EE Revisits Design Patterns
Java EE Revisits Design PatternsJava EE Revisits Design Patterns
Java EE Revisits Design PatternsAlex Theedom
 
An Introduction to Maven
An Introduction to MavenAn Introduction to Maven
An Introduction to MavenVadym Lotar
 

Viewers also liked (6)

SE2016 Java Alex Theedom "Java EE revisits design patterns"
SE2016 Java Alex Theedom "Java EE revisits design patterns"SE2016 Java Alex Theedom "Java EE revisits design patterns"
SE2016 Java Alex Theedom "Java EE revisits design patterns"
 
Servlet and jsp interview questions
Servlet and jsp interview questionsServlet and jsp interview questions
Servlet and jsp interview questions
 
Maven Overview
Maven OverviewMaven Overview
Maven Overview
 
Java EE Revisits Design Patterns
Java EE Revisits Design PatternsJava EE Revisits Design Patterns
Java EE Revisits Design Patterns
 
J2ee architecture
J2ee architectureJ2ee architecture
J2ee architecture
 
An Introduction to Maven
An Introduction to MavenAn Introduction to Maven
An Introduction to Maven
 

Similar to How to deploy a j2ee application

Oracle EBS 12.1.3 : Integrate OA Framework BC4J components within java concur...
Oracle EBS 12.1.3 : Integrate OA Framework BC4J components within java concur...Oracle EBS 12.1.3 : Integrate OA Framework BC4J components within java concur...
Oracle EBS 12.1.3 : Integrate OA Framework BC4J components within java concur...Amit Singh
 
Part 5 running java applications
Part 5 running java applicationsPart 5 running java applications
Part 5 running java applicationstechbed
 
Part 3 web development
Part 3 web developmentPart 3 web development
Part 3 web developmenttechbed
 
Lab 7b) test a web application
Lab 7b) test a web applicationLab 7b) test a web application
Lab 7b) test a web applicationtechbed
 
Part 2 java development
Part 2 java developmentPart 2 java development
Part 2 java developmenttechbed
 
Implementing xpages extension library
Implementing xpages extension libraryImplementing xpages extension library
Implementing xpages extension librarydominion
 
1) workbench basics
1) workbench basics1) workbench basics
1) workbench basicstechbed
 
Supplement J Eclipse
Supplement J EclipseSupplement J Eclipse
Supplement J Eclipsenga
 
Part 6 debugging and testing java applications
Part 6 debugging and testing java applicationsPart 6 debugging and testing java applications
Part 6 debugging and testing java applicationstechbed
 
J boss ide-tutorial
J boss ide-tutorialJ boss ide-tutorial
J boss ide-tutorialUTN
 
Tivoli perfviewer
Tivoli perfviewerTivoli perfviewer
Tivoli perfvieweritsolvs
 
Free EJB Tutorial | VirtualNuggets
Free EJB Tutorial | VirtualNuggetsFree EJB Tutorial | VirtualNuggets
Free EJB Tutorial | VirtualNuggetsVirtual Nuggets
 
Part 7 packaging and deployment
Part 7 packaging and deploymentPart 7 packaging and deployment
Part 7 packaging and deploymenttechbed
 
Spring hibernate tutorial
Spring hibernate tutorialSpring hibernate tutorial
Spring hibernate tutorialRohit Jagtap
 
Getting started-with-zend-framework
Getting started-with-zend-frameworkGetting started-with-zend-framework
Getting started-with-zend-frameworkNilesh Bangar
 
Java Intro: Unit1. Hello World
Java Intro: Unit1. Hello WorldJava Intro: Unit1. Hello World
Java Intro: Unit1. Hello WorldYakov Fain
 

Similar to How to deploy a j2ee application (20)

Oracle EBS 12.1.3 : Integrate OA Framework BC4J components within java concur...
Oracle EBS 12.1.3 : Integrate OA Framework BC4J components within java concur...Oracle EBS 12.1.3 : Integrate OA Framework BC4J components within java concur...
Oracle EBS 12.1.3 : Integrate OA Framework BC4J components within java concur...
 
Part 5 running java applications
Part 5 running java applicationsPart 5 running java applications
Part 5 running java applications
 
Part 3 web development
Part 3 web developmentPart 3 web development
Part 3 web development
 
Resourceslab fixed
Resourceslab fixedResourceslab fixed
Resourceslab fixed
 
Lab3 RTC Source Control
Lab3 RTC Source ControlLab3 RTC Source Control
Lab3 RTC Source Control
 
Lab 7b) test a web application
Lab 7b) test a web applicationLab 7b) test a web application
Lab 7b) test a web application
 
Part 2 java development
Part 2 java developmentPart 2 java development
Part 2 java development
 
Implementing xpages extension library
Implementing xpages extension libraryImplementing xpages extension library
Implementing xpages extension library
 
1) workbench basics
1) workbench basics1) workbench basics
1) workbench basics
 
Supplement J Eclipse
Supplement J EclipseSupplement J Eclipse
Supplement J Eclipse
 
Part 6 debugging and testing java applications
Part 6 debugging and testing java applicationsPart 6 debugging and testing java applications
Part 6 debugging and testing java applications
 
J boss ide-tutorial
J boss ide-tutorialJ boss ide-tutorial
J boss ide-tutorial
 
Tivoli perfviewer
Tivoli perfviewerTivoli perfviewer
Tivoli perfviewer
 
Free EJB Tutorial | VirtualNuggets
Free EJB Tutorial | VirtualNuggetsFree EJB Tutorial | VirtualNuggets
Free EJB Tutorial | VirtualNuggets
 
Jsf tutorial
Jsf tutorialJsf tutorial
Jsf tutorial
 
Part 7 packaging and deployment
Part 7 packaging and deploymentPart 7 packaging and deployment
Part 7 packaging and deployment
 
Spring hibernate tutorial
Spring hibernate tutorialSpring hibernate tutorial
Spring hibernate tutorial
 
Getting started-with-zend-framework
Getting started-with-zend-frameworkGetting started-with-zend-framework
Getting started-with-zend-framework
 
J introtojava1-pdf
J introtojava1-pdfJ introtojava1-pdf
J introtojava1-pdf
 
Java Intro: Unit1. Hello World
Java Intro: Unit1. Hello WorldJava Intro: Unit1. Hello World
Java Intro: Unit1. Hello World
 

More from Kumar

Graphics devices
Graphics devicesGraphics devices
Graphics devicesKumar
 
Fill area algorithms
Fill area algorithmsFill area algorithms
Fill area algorithmsKumar
 
region-filling
region-fillingregion-filling
region-fillingKumar
 
Bresenham derivation
Bresenham derivationBresenham derivation
Bresenham derivationKumar
 
Bresenham circles and polygons derication
Bresenham circles and polygons dericationBresenham circles and polygons derication
Bresenham circles and polygons dericationKumar
 
Introductionto xslt
Introductionto xsltIntroductionto xslt
Introductionto xsltKumar
 
Extracting data from xml
Extracting data from xmlExtracting data from xml
Extracting data from xmlKumar
 
Xml basics
Xml basicsXml basics
Xml basicsKumar
 
XML Schema
XML SchemaXML Schema
XML SchemaKumar
 
Publishing xml
Publishing xmlPublishing xml
Publishing xmlKumar
 
Applying xml
Applying xmlApplying xml
Applying xmlKumar
 
Introduction to XML
Introduction to XMLIntroduction to XML
Introduction to XMLKumar
 
JNDI, JMS, JPA, XML
JNDI, JMS, JPA, XMLJNDI, JMS, JPA, XML
JNDI, JMS, JPA, XMLKumar
 
EJB Fundmentals
EJB FundmentalsEJB Fundmentals
EJB FundmentalsKumar
 
JSP and struts programming
JSP and struts programmingJSP and struts programming
JSP and struts programmingKumar
 
java servlet and servlet programming
java servlet and servlet programmingjava servlet and servlet programming
java servlet and servlet programmingKumar
 
Introduction to JDBC and JDBC Drivers
Introduction to JDBC and JDBC DriversIntroduction to JDBC and JDBC Drivers
Introduction to JDBC and JDBC DriversKumar
 
Introduction to J2EE
Introduction to J2EEIntroduction to J2EE
Introduction to J2EEKumar
 
Android tutorial (2)
Android tutorial (2)Android tutorial (2)
Android tutorial (2)Kumar
 

More from Kumar (20)

Graphics devices
Graphics devicesGraphics devices
Graphics devices
 
Fill area algorithms
Fill area algorithmsFill area algorithms
Fill area algorithms
 
region-filling
region-fillingregion-filling
region-filling
 
Bresenham derivation
Bresenham derivationBresenham derivation
Bresenham derivation
 
Bresenham circles and polygons derication
Bresenham circles and polygons dericationBresenham circles and polygons derication
Bresenham circles and polygons derication
 
Introductionto xslt
Introductionto xsltIntroductionto xslt
Introductionto xslt
 
Extracting data from xml
Extracting data from xmlExtracting data from xml
Extracting data from xml
 
Xml basics
Xml basicsXml basics
Xml basics
 
XML Schema
XML SchemaXML Schema
XML Schema
 
Publishing xml
Publishing xmlPublishing xml
Publishing xml
 
DTD
DTDDTD
DTD
 
Applying xml
Applying xmlApplying xml
Applying xml
 
Introduction to XML
Introduction to XMLIntroduction to XML
Introduction to XML
 
JNDI, JMS, JPA, XML
JNDI, JMS, JPA, XMLJNDI, JMS, JPA, XML
JNDI, JMS, JPA, XML
 
EJB Fundmentals
EJB FundmentalsEJB Fundmentals
EJB Fundmentals
 
JSP and struts programming
JSP and struts programmingJSP and struts programming
JSP and struts programming
 
java servlet and servlet programming
java servlet and servlet programmingjava servlet and servlet programming
java servlet and servlet programming
 
Introduction to JDBC and JDBC Drivers
Introduction to JDBC and JDBC DriversIntroduction to JDBC and JDBC Drivers
Introduction to JDBC and JDBC Drivers
 
Introduction to J2EE
Introduction to J2EEIntroduction to J2EE
Introduction to J2EE
 
Android tutorial (2)
Android tutorial (2)Android tutorial (2)
Android tutorial (2)
 

Recently uploaded

Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptxSherlyMaeNeri
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersSabitha Banu
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designMIPLM
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Mark Reed
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)lakshayb543
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxiammrhaywood
 
ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomnelietumpap1
 
Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxDr.Ibrahim Hassaan
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxHumphrey A Beña
 
Grade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxGrade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxChelloAnnAsuncion2
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...Postal Advocate Inc.
 
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfInclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfTechSoup
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Celine George
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...JhezDiaz1
 

Recently uploaded (20)

Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptx
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptxFINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginners
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-design
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
 
ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choom
 
Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptx
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
 
Grade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxGrade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptx
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
 
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfInclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
 
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptxYOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
 

How to deploy a j2ee application

  • 1. Instructor Exercises Guide Course materials may not be reproduced in whole or in part without the prior written permission of IBM. © Copyright IBM Corp. 2004, 2007 Exercise 13. Package and Deploy a J2EE Application 13-1 V4.1 EXempty Exercise 13.Package and Deploy a J2EE Application Estimated Time 00:30 What This Exercise Is About This exercise takes the library application that has been developed and tested in IBM Rational Application Developer and exports it for deployment on a server. What You Should Be Able to Do At the end of the lab, you will be able to: • Package an application as an EAR file and export it from the IBM Rational Application Developer environment • Install the EAR file on IBM WebSphere Application Server • Test the application on a browser Introduction The integrated development environment of IBM Rational Application Developer has many advantages, not the least of which is the behind-the-scenes aspect of testing. This means that Run on Server will automatically deploy and install code, open a browser, and run a Web application. However, a completed application will need to be packaged, exported from this environment, and installed on a remote server. This exercise simulates this process. Although the server is the same local server that has been used for testing, it is in fact a stand-alone WebSphere Application Server that can be used outside of the Rational Application Server environment. In this exercise, you will export the Web application (packaged in an EAR file), then use the WebSphere Application Server Administrative console to install and configure it. Finally, you will test it using an external browser.
  • 2. Instructor Exercises Guide Course materials may not be reproduced in whole or in part without the prior written permission of IBM. 13-2 Developing Web Applications © Copyright IBM Corp. 2004, 2007 Required Materials This exercise requires the database to be set up in a specific way using files that can be found in the <LAB_FILES>Deployimports directory. Make sure you have these files before starting the lab. Instructor Exercise Overview It is difficult to create a truly real-life situation when the only environment available is a standalone computer! Before students begin this exercise, draw diagrams on the whiteboard showing how the single environment of Rational Application Developer development becomes the multiple environment of deployment. Here is an example: All the required steps are simple, and students will have done many of them several times during the week. It is therefore very important to set the scene and explain exactly why they are doing this exercise.
  • 3. Instructor Exercises Guide Course materials may not be reproduced in whole or in part without the prior written permission of IBM. © Copyright IBM Corp. 2004, 2007 Exercise 13. Package and Deploy a J2EE Application 13-3 V4.1 EXempty Exercise Instructions Preface The following references in the exercise instructions represent directory locations in your workstation: • <LAB_FILES>: C:LabFiles70 • <SDP_DIR>: C:IBMSDP70
  • 4. Instructor Exercises Guide Course materials may not be reproduced in whole or in part without the prior written permission of IBM. 13-4 Developing Web Applications © Copyright IBM Corp. 2004, 2007 13.1. Prepare the Workspace If you skipped previous labs, specifically labs 1-4, perform the following instructions: __ 1. Start IBM Rational Application Developer. __ a. In the Workspace Launcher dialog, specify <LAB_FILES>workspace as the new workspace directory. __ b. Click OK to open the workspace. __ c. Import the <LAB_FILES>ProfilesolutionProfileSolution.zip project interchange file. If you need assistance, refer to the instructions in the Appendix, Install the Library Application in a New Workspace.
  • 5. Instructor Exercises Guide Course materials may not be reproduced in whole or in part without the prior written permission of IBM. © Copyright IBM Corp. 2004, 2007 Exercise 13. Package and Deploy a J2EE Application 13-5 V4.1 EXempty 13.2. Reset the Database In the previous lab, the Library database was populated in a specific way to demonstrate profiling. Now it needs to be set back to its original state. If you skipped the profiling lab, you can skip to section 13.3. __ 2. Ensure that the WebSphere Application Server is stopped. __ a. In the Servers view, right-click WebSphere Application Server v6.1 and select Stop. __ 3. Import new database configuration files to reset the database default value. __ a. In the Project Explorer, right-click LibraryDatabaseSetup and select Import. __ b. Select File System in the Import dialog, then click Next. __ c. In the From Directory field, browse to <LAB_FILES>Deployimports. __ d. Click Select All to select all files in the imports folder. __ e. Select Overwrite existing resources without warning. Also make sure the Into folder is set to LibraryDatabaseSetup.
  • 6. Instructor Exercises Guide Course materials may not be reproduced in whole or in part without the prior written permission of IBM. 13-6 Developing Web Applications © Copyright IBM Corp. 2004, 2007 __ f. Click Finish. __ 4. Recreate the database. __ a. In the Project Explorer, expand LibraryDatabaseSetup driver. __ b. Right-click SetUpLibraryDatabase.java and select Run As Java Application. __ c. The following messages should be shown in the Console view. Drop existing tables (if they exist) SQL Executed with no errors: SQL Executed with no errors: SQL Executed with no errors: SQL Executed with no errors: SQL Executed with no errors: SQL Executed with no errors: Create the library tables SQL Executed with no errors: SQL Executed with no errors: SQL Executed with no errors: SQL Executed with no errors: SQL Executed with no errors: SQL Executed with no errors: Load the item table A total of 6 records were processed There were 6 rows added without errors There were 0 warnings and 0 errors Load the patron table A total of 6 records were processed There were 6 rows added without errors There were 0 warnings and 0 errors Load the copy table A total of 13 records were processed There were 13 rows added without errors There were 0 warnings and 0 errors Load the onloan table A total of 6 records were processed There were 6 rows added without errors There were 0 warnings and 0 errors
  • 7. Instructor Exercises Guide Course materials may not be reproduced in whole or in part without the prior written permission of IBM. © Copyright IBM Corp. 2004, 2007 Exercise 13. Package and Deploy a J2EE Application 13-7 V4.1 EXempty Load the tablemax table A total of 3 records were processed There were 3 rows added without errors There were 0 warnings and 0 errors
  • 8. Instructor Exercises Guide Course materials may not be reproduced in whole or in part without the prior written permission of IBM. 13-8 Developing Web Applications © Copyright IBM Corp. 2004, 2007 13.3. Package the EAR File __ 5. Export the LibraryEAR project as library.ear file. __ a. In the Project Explorer view, right-click LibraryEAR, and select Prepare for Deployment. __ b. In the Project Explorer view, right-click LibraryEAR, and select Export EAR file. __ c. In the EAR Export dialog, select LibraryEAR as the EAR application, and browse to <LAB_FILES>Deployexportslibrary.ear for the Destination. __ d. Click Finish. __ e. You should now be able to locate the library.ear file in the <LAB_FILES>Deployexports directory.
  • 9. Instructor Exercises Guide Course materials may not be reproduced in whole or in part without the prior written permission of IBM. © Copyright IBM Corp. 2004, 2007 Exercise 13. Package and Deploy a J2EE Application 13-9 V4.1 EXempty 13.4. Start the server and Administrative Console __ 6. Remove projects from the server. __ a. In the Servers view, expand WebSphere Application Server v6.1, right-click LibraryEAR, and select Remove. __ b. Click OK in the confirmation dialog. __ 7. Start the server. __ a. In the Servers view, right-click WebSphere Application Server V6.1, and select Start. __ b. Switch to the Servers view and wait for the server status to change to Started. __ 8. Start administrative console. __ a. Right-click WebSphere Application Server V6.1 from the Servers view, then select Run administrative console to load the administrative console in a Web browser. __ b. Type admin in the User ID field, and click Log in.
  • 10. Instructor Exercises Guide Course materials may not be reproduced in whole or in part without the prior written permission of IBM. 13-10 Developing Web Applications © Copyright IBM Corp. 2004, 2007 13.5. Install the Enterprise Application __ 9. Install Library Enterprise Application to the application server (server1). __ a. In the Admin Console, expand Applications in the left navigation, and click Install New Application. __ b. In the Preparing for the application installation page, select Local file system and click Browse. Navigate to the <LAB_FILES>deployexports directory where the library.ear was saved in the previous step. Select library.ear and click Open. The Local file system field should now contain the path of the EAR file. __ c. Click Next. __ d. The next page will show Step 1: Select installation options. On the left side menu, notice that there are three steps to complete. You can complete each step
  • 11. Instructor Exercises Guide Course materials may not be reproduced in whole or in part without the prior written permission of IBM. © Copyright IBM Corp. 2004, 2007 Exercise 13. Package and Deploy a J2EE Application 13-11 V4.1 EXempty in turn and press Next to navigate to the next step, or you can jump directly to a step by clicking on its link. __ e. In Step 1, select the check box to enable Pre-compile JSP. This operation takes a little while to complete, but is an excellent option to select when testing. This way you can ensure that all JSPs will compile. In production, this is a way to
  • 12. Instructor Exercises Guide Course materials may not be reproduced in whole or in part without the prior written permission of IBM. 13-12 Developing Web Applications © Copyright IBM Corp. 2004, 2007 reduce the response time for the first request of a JSP page. Change the Application name to LibraryApplication. Click Next. __ f. Step 2 will now be displayed. Notice that Step 1 is still listed as a hyperlink, allowing you to return to any previous step. Step 2 allows you to map modules
  • 13. Instructor Exercises Guide Course materials may not be reproduced in whole or in part without the prior written permission of IBM. © Copyright IBM Corp. 2004, 2007 Exercise 13. Package and Deploy a J2EE Application 13-13 V4.1 EXempty that are contained in your application. You have only one module, LibraryWeb, which has already been configured to deploy to server1. Click Next. __ g. Step 3 displays a summary of the configurations set in the previous steps. Verify the information, then click Finish. __ h. You should see a page headed Installing, and messages will scroll down to indicate the progress of the installation. The application server will step through
  • 14. Instructor Exercises Guide Course materials may not be reproduced in whole or in part without the prior written permission of IBM. 13-14 Developing Web Applications © Copyright IBM Corp. 2004, 2007 the module to performing installation tasks. Look for the following message to confirm that the enterprise application was successfully installed.
  • 15. Instructor Exercises Guide Course materials may not be reproduced in whole or in part without the prior written permission of IBM. © Copyright IBM Corp. 2004, 2007 Exercise 13. Package and Deploy a J2EE Application 13-15 V4.1 EXempty 13.6. Start the Enterprise Application Before you can test the application, you must start the LibraryApplication. __ 10. Start the Library enterprise application. __ a. In the Admin Console, expand Applications, and click Enterprise Applications. The page displayed in the workspace lists the enterprise applications installed, and indicates whether they are started or stopped. __ b. Select the check-box next to LibraryApplication and Click Start. This will attempt to start the LibraryApplication enterprise application. __ c. Once completed, look for a message at the top of the screen indicating that LibraryApplication started successfully. __ d. Scroll down to the list of enterprise applications table, and you should also see that LibraryApplication has a status of Started. Note If an error is reported, use the command prompt to change to the <SDP_DIR>runtimesbase_v61profilesAppSrv01logsserver1 directory and display the contents of SystemOut.log. Scroll down to the bottom of the file to see the latest messages. This should provide more information about the error. Verify that you followed all of the above steps correctly, and try restarting the server if you still experience problems.
  • 16. Instructor Exercises Guide Course materials may not be reproduced in whole or in part without the prior written permission of IBM. 13-16 Developing Web Applications © Copyright IBM Corp. 2004, 2007 13.7. Test the Library Application __ 11. Test the Servlet. __ a. In the J2EE perspective, click the Web browser icon. __ b. In the Web browser, enter the address http://localhost:9080/Library/List. A list of all the patrons and their on loan items should be displayed. __ 12. Test the JSP pages. __ a. In the Web browser, specify the address http://localhost:9080/Library/search.jsp.
  • 17. Instructor Exercises Guide Course materials may not be reproduced in whole or in part without the prior written permission of IBM. © Copyright IBM Corp. 2004, 2007 Exercise 13. Package and Deploy a J2EE Application 13-17 V4.1 EXempty __ b. Type 4 in Search Phrase, select Patron ID, and click Search. __ c. The list of items for that patron should be displayed. __ 13. Test the Struts pages. __ a. Type http://localhost:9080/Library/login.jsp in the browser address to go to a login page. __ b. Type 2 in User ID and vogel in Password, then click Login.
  • 18. Instructor Exercises Guide Course materials may not be reproduced in whole or in part without the prior written permission of IBM. 13-18 Developing Web Applications © Copyright IBM Corp. 2004, 2007 __ c. The following page should show upon a successful login. __ 14. Test the JSF pages. __ a. Type http://localhost:9080/Library/faces/register.jsp in the browser address to load the Register A New Patron page. __ b. Enter the following information, then click Register. - First Name: Jimmy - Last Name: World - Email: jv@ibm.com - Password: donuts __ c. The registration successful page should now show, with a random ID generated for the patron.
  • 19. Instructor Exercises Guide Course materials may not be reproduced in whole or in part without the prior written permission of IBM. © Copyright IBM Corp. 2004, 2007 Exercise 13. Package and Deploy a J2EE Application 13-19 V4.1 EXempty END OF LAB