SlideShare uma empresa Scribd logo
1 de 19
V4.1
                                                                                                   Instructor Exercises Guide



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.




          © Copyright IBM Corp. 2004, 2007                   Exercise 13. Package and Deploy a J2EE Application         13-1
                                      Course materials may not be reproduced in whole or in part
                                             without the prior written permission of IBM.
Instructor Exercises Guide



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.




13-2 Developing Web Applications                                                  © Copyright IBM Corp. 2004, 2007
                             Course materials may not be reproduced in whole or in part
                                    without the prior written permission of IBM.
V4.1
                                                                                                   Instructor Exercises Guide



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




          © Copyright IBM Corp. 2004, 2007                   Exercise 13. Package and Deploy a J2EE Application         13-3
                                      Course materials may not be reproduced in whole or in part
                                             without the prior written permission of IBM.
Instructor Exercises Guide



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.




13-4 Developing Web Applications                                                  © Copyright IBM Corp. 2004, 2007
                             Course materials may not be reproduced in whole or in part
                                    without the prior written permission of IBM.
V4.1
                                                                                                   Instructor Exercises Guide



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.




          © Copyright IBM Corp. 2004, 2007                   Exercise 13. Package and Deploy a J2EE Application         13-5
                                      Course materials may not be reproduced in whole or in part
                                             without the prior written permission of IBM.
Instructor Exercises Guide


    __ 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



13-6 Developing Web Applications                                                  © Copyright IBM Corp. 2004, 2007
                             Course materials may not be reproduced in whole or in part
                                    without the prior written permission of IBM.
V4.1
                                                                                                   Instructor Exercises Guide



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




          © Copyright IBM Corp. 2004, 2007                   Exercise 13. Package and Deploy a J2EE Application         13-7
                                      Course materials may not be reproduced in whole or in part
                                             without the prior written permission of IBM.
Instructor Exercises Guide



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.




13-8 Developing Web Applications                                                  © Copyright IBM Corp. 2004, 2007
                             Course materials may not be reproduced in whole or in part
                                    without the prior written permission of IBM.
V4.1
                                                                                                   Instructor Exercises Guide



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.




          © Copyright IBM Corp. 2004, 2007                   Exercise 13. Package and Deploy a J2EE Application         13-9
                                      Course materials may not be reproduced in whole or in part
                                             without the prior written permission of IBM.
Instructor Exercises Guide



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




13-10 Developing Web Applications                                                 © Copyright IBM Corp. 2004, 2007
                             Course materials may not be reproduced in whole or in part
                                    without the prior written permission of IBM.
V4.1
                                                                                                   Instructor Exercises Guide



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




          © Copyright IBM Corp. 2004, 2007                   Exercise 13. Package and Deploy a J2EE Application        13-11
                                      Course materials may not be reproduced in whole or in part
                                             without the prior written permission of IBM.
Instructor Exercises Guide


            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-12 Developing Web Applications                                                 © Copyright IBM Corp. 2004, 2007
                             Course materials may not be reproduced in whole or in part
                                    without the prior written permission of IBM.
V4.1
                                                                                                   Instructor Exercises Guide



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




          © Copyright IBM Corp. 2004, 2007                   Exercise 13. Package and Deploy a J2EE Application        13-13
                                      Course materials may not be reproduced in whole or in part
                                             without the prior written permission of IBM.
Instructor Exercises Guide


            the module to performing installation tasks. Look for the following message to
            confirm that the enterprise application was successfully installed.




13-14 Developing Web Applications                                                 © Copyright IBM Corp. 2004, 2007
                             Course materials may not be reproduced in whole or in part
                                    without the prior written permission of IBM.
V4.1
                                                                                                   Instructor Exercises Guide



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.




          © Copyright IBM Corp. 2004, 2007                   Exercise 13. Package and Deploy a J2EE Application        13-15
                                      Course materials may not be reproduced in whole or in part
                                             without the prior written permission of IBM.
Instructor Exercises Guide



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.




13-16 Developing Web Applications                                                 © Copyright IBM Corp. 2004, 2007
                             Course materials may not be reproduced in whole or in part
                                    without the prior written permission of IBM.
V4.1
                                                                                                   Instructor Exercises Guide



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.




          © Copyright IBM Corp. 2004, 2007                   Exercise 13. Package and Deploy a J2EE Application        13-17
                                      Course materials may not be reproduced in whole or in part
                                             without the prior written permission of IBM.
Instructor Exercises Guide


    __ 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.



13-18 Developing Web Applications                                                 © Copyright IBM Corp. 2004, 2007
                             Course materials may not be reproduced in whole or in part
                                    without the prior written permission of IBM.
V4.1
                                                                                                   Instructor Exercises Guide



EXempty   END OF LAB




          © Copyright IBM Corp. 2004, 2007                   Exercise 13. Package and Deploy a J2EE Application        13-19
                                      Course materials may not be reproduced in whole or in part
                                             without the prior written permission of IBM.

Mais conteúdo relacionado

Mais procurados

Installing ibm tivoli directory server v6.0 (web sphere partner gateway v6.1 ...
Installing ibm tivoli directory server v6.0 (web sphere partner gateway v6.1 ...Installing ibm tivoli directory server v6.0 (web sphere partner gateway v6.1 ...
Installing ibm tivoli directory server v6.0 (web sphere partner gateway v6.1 ...Banking at Ho Chi Minh city
 
Portal at the Speed of Light
Portal at the Speed of LightPortal at the Speed of Light
Portal at the Speed of LightProlifics
 
Vsx5 getting started_guide_en
Vsx5 getting started_guide_enVsx5 getting started_guide_en
Vsx5 getting started_guide_enGeraldo Camargo
 
JavaOne 2009 Deploying Apps for Consumers Bof5150
JavaOne 2009 Deploying Apps for Consumers Bof5150JavaOne 2009 Deploying Apps for Consumers Bof5150
JavaOne 2009 Deploying Apps for Consumers Bof5150Jeff Hoffman
 
Features & Installation Profiles
Features & Installation ProfilesFeatures & Installation Profiles
Features & Installation ProfilesDavid Watson
 
02.egovFrame Development Environment training book
02.egovFrame Development Environment training book02.egovFrame Development Environment training book
02.egovFrame Development Environment training bookChuong Nguyen
 
SharePoint 2010 Training Session 3
SharePoint 2010 Training Session 3SharePoint 2010 Training Session 3
SharePoint 2010 Training Session 3Usman Zafar Malik
 
Workshop OSGI PPT
Workshop OSGI PPTWorkshop OSGI PPT
Workshop OSGI PPTSummer Lu
 
Visual studio developer tools v1.25c
Visual studio developer tools v1.25cVisual studio developer tools v1.25c
Visual studio developer tools v1.25cBreinSoft54
 
Applet Returns: The new generation of Java Plug-ins
Applet Returns: The new generation of Java Plug-insApplet Returns: The new generation of Java Plug-ins
Applet Returns: The new generation of Java Plug-insSerge Rehem
 
Upgrading to SharePoint 2013
Upgrading to SharePoint 2013Upgrading to SharePoint 2013
Upgrading to SharePoint 2013Ejada
 
Cognos 10 upgrade migrate fixpack by bhawani nandan prasad
Cognos 10 upgrade migrate fixpack by bhawani nandan prasadCognos 10 upgrade migrate fixpack by bhawani nandan prasad
Cognos 10 upgrade migrate fixpack by bhawani nandan prasadBhawani N Prasad
 
Automating Your Enterprise Application Deployments With PowerShell by Geoff V...
Automating Your Enterprise Application Deployments With PowerShell by Geoff V...Automating Your Enterprise Application Deployments With PowerShell by Geoff V...
Automating Your Enterprise Application Deployments With PowerShell by Geoff V...SPTechCon
 
REV 2013 - Grid Remote Laboratory Management System: Sahara Reaches Europe
REV 2013 - Grid Remote Laboratory Management System: Sahara Reaches EuropeREV 2013 - Grid Remote Laboratory Management System: Sahara Reaches Europe
REV 2013 - Grid Remote Laboratory Management System: Sahara Reaches EuropeMohamed Tawfik
 

Mais procurados (19)

Installing ibm tivoli directory server v6.0 (web sphere partner gateway v6.1 ...
Installing ibm tivoli directory server v6.0 (web sphere partner gateway v6.1 ...Installing ibm tivoli directory server v6.0 (web sphere partner gateway v6.1 ...
Installing ibm tivoli directory server v6.0 (web sphere partner gateway v6.1 ...
 
JavaEE6
JavaEE6JavaEE6
JavaEE6
 
Resource lab
Resource labResource lab
Resource lab
 
Java server face tutorial
Java server face tutorialJava server face tutorial
Java server face tutorial
 
Portal at the Speed of Light
Portal at the Speed of LightPortal at the Speed of Light
Portal at the Speed of Light
 
Vsx5 getting started_guide_en
Vsx5 getting started_guide_enVsx5 getting started_guide_en
Vsx5 getting started_guide_en
 
JavaOne 2009 Deploying Apps for Consumers Bof5150
JavaOne 2009 Deploying Apps for Consumers Bof5150JavaOne 2009 Deploying Apps for Consumers Bof5150
JavaOne 2009 Deploying Apps for Consumers Bof5150
 
Features & Installation Profiles
Features & Installation ProfilesFeatures & Installation Profiles
Features & Installation Profiles
 
WAS 8 Webcast
WAS 8 WebcastWAS 8 Webcast
WAS 8 Webcast
 
02.egovFrame Development Environment training book
02.egovFrame Development Environment training book02.egovFrame Development Environment training book
02.egovFrame Development Environment training book
 
Workflow for XPages
Workflow for XPagesWorkflow for XPages
Workflow for XPages
 
SharePoint 2010 Training Session 3
SharePoint 2010 Training Session 3SharePoint 2010 Training Session 3
SharePoint 2010 Training Session 3
 
Workshop OSGI PPT
Workshop OSGI PPTWorkshop OSGI PPT
Workshop OSGI PPT
 
Visual studio developer tools v1.25c
Visual studio developer tools v1.25cVisual studio developer tools v1.25c
Visual studio developer tools v1.25c
 
Applet Returns: The new generation of Java Plug-ins
Applet Returns: The new generation of Java Plug-insApplet Returns: The new generation of Java Plug-ins
Applet Returns: The new generation of Java Plug-ins
 
Upgrading to SharePoint 2013
Upgrading to SharePoint 2013Upgrading to SharePoint 2013
Upgrading to SharePoint 2013
 
Cognos 10 upgrade migrate fixpack by bhawani nandan prasad
Cognos 10 upgrade migrate fixpack by bhawani nandan prasadCognos 10 upgrade migrate fixpack by bhawani nandan prasad
Cognos 10 upgrade migrate fixpack by bhawani nandan prasad
 
Automating Your Enterprise Application Deployments With PowerShell by Geoff V...
Automating Your Enterprise Application Deployments With PowerShell by Geoff V...Automating Your Enterprise Application Deployments With PowerShell by Geoff V...
Automating Your Enterprise Application Deployments With PowerShell by Geoff V...
 
REV 2013 - Grid Remote Laboratory Management System: Sahara Reaches Europe
REV 2013 - Grid Remote Laboratory Management System: Sahara Reaches EuropeREV 2013 - Grid Remote Laboratory Management System: Sahara Reaches Europe
REV 2013 - Grid Remote Laboratory Management System: Sahara Reaches Europe
 

Destaque

Linear programming worked problem
Linear programming worked problemLinear programming worked problem
Linear programming worked problemEdgar Mata
 
Fedtalks Presentation: Chris C. Kemp, NASA CTO
Fedtalks Presentation: Chris C. Kemp, NASA CTOFedtalks Presentation: Chris C. Kemp, NASA CTO
Fedtalks Presentation: Chris C. Kemp, NASA CTOAlexander Howard
 
Part 2 java development
Part 2 java developmentPart 2 java development
Part 2 java developmenttechbed
 
Data Journalism and the Remaking of Data Infrastructures
Data Journalism and the Remaking of Data InfrastructuresData Journalism and the Remaking of Data Infrastructures
Data Journalism and the Remaking of Data InfrastructuresLiliana Bounegru
 
What Can I Learn From You?
What Can I Learn From You?What Can I Learn From You?
What Can I Learn From You?gmaran23
 
Pablo Pérez. Midiendo la felicidad en equipos
Pablo Pérez. Midiendo la felicidad en equiposPablo Pérez. Midiendo la felicidad en equipos
Pablo Pérez. Midiendo la felicidad en equipos233 Grados de TI
 
Operation Module eresource 3GL ERP(ERP for Transportation)
Operation Module  eresource 3GL ERP(ERP for Transportation)Operation Module  eresource 3GL ERP(ERP for Transportation)
Operation Module eresource 3GL ERP(ERP for Transportation)nfra erp
 
Richard Rogers, Otherwise Engaged: Critical Analytics and the New Meanings of...
Richard Rogers, Otherwise Engaged: Critical Analytics and the New Meanings of...Richard Rogers, Otherwise Engaged: Critical Analytics and the New Meanings of...
Richard Rogers, Otherwise Engaged: Critical Analytics and the New Meanings of...Digital Methods Initiative
 
1359 Vi Editor
1359 Vi Editor1359 Vi Editor
1359 Vi Editortechbed
 
Data Journalism - Introduction
Data Journalism - IntroductionData Journalism - Introduction
Data Journalism - IntroductionBahareh Heravi
 

Destaque (11)

Linear programming worked problem
Linear programming worked problemLinear programming worked problem
Linear programming worked problem
 
Fedtalks Presentation: Chris C. Kemp, NASA CTO
Fedtalks Presentation: Chris C. Kemp, NASA CTOFedtalks Presentation: Chris C. Kemp, NASA CTO
Fedtalks Presentation: Chris C. Kemp, NASA CTO
 
Part 2 java development
Part 2 java developmentPart 2 java development
Part 2 java development
 
Data Journalism and the Remaking of Data Infrastructures
Data Journalism and the Remaking of Data InfrastructuresData Journalism and the Remaking of Data Infrastructures
Data Journalism and the Remaking of Data Infrastructures
 
What Can I Learn From You?
What Can I Learn From You?What Can I Learn From You?
What Can I Learn From You?
 
Pablo Pérez. Midiendo la felicidad en equipos
Pablo Pérez. Midiendo la felicidad en equiposPablo Pérez. Midiendo la felicidad en equipos
Pablo Pérez. Midiendo la felicidad en equipos
 
Operation Module eresource 3GL ERP(ERP for Transportation)
Operation Module  eresource 3GL ERP(ERP for Transportation)Operation Module  eresource 3GL ERP(ERP for Transportation)
Operation Module eresource 3GL ERP(ERP for Transportation)
 
Richard Rogers, Otherwise Engaged: Critical Analytics and the New Meanings of...
Richard Rogers, Otherwise Engaged: Critical Analytics and the New Meanings of...Richard Rogers, Otherwise Engaged: Critical Analytics and the New Meanings of...
Richard Rogers, Otherwise Engaged: Critical Analytics and the New Meanings of...
 
1359 Vi Editor
1359 Vi Editor1359 Vi Editor
1359 Vi Editor
 
sip ppt
sip pptsip ppt
sip ppt
 
Data Journalism - Introduction
Data Journalism - IntroductionData Journalism - Introduction
Data Journalism - Introduction
 

Semelhante a Lab 6) package and deploy a j2 ee application

Lab 5b) create a java server faces application
Lab 5b) create a java server faces applicationLab 5b) create a java server faces application
Lab 5b) create a java server faces applicationtechbed
 
Lab 7b) test a web application
Lab 7b) test a web applicationLab 7b) test a web application
Lab 7b) test a web applicationtechbed
 
Lab 3) create a web application
Lab 3) create a web applicationLab 3) create a web application
Lab 3) create a web applicationtechbed
 
Part 3 web development
Part 3 web developmentPart 3 web development
Part 3 web developmenttechbed
 
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
 
F7 wc9 zu3701lsg_ai
F7 wc9 zu3701lsg_aiF7 wc9 zu3701lsg_ai
F7 wc9 zu3701lsg_aipiano_girl
 
Part 5 running java applications
Part 5 running java applicationsPart 5 running java applications
Part 5 running java applicationstechbed
 
Lab 5a) create a struts application
Lab 5a) create a struts applicationLab 5a) create a struts application
Lab 5a) create a struts applicationtechbed
 
Tivoli perfviewer
Tivoli perfviewerTivoli perfviewer
Tivoli perfvieweritsolvs
 
Part 7 packaging and deployment
Part 7 packaging and deploymentPart 7 packaging and deployment
Part 7 packaging and deploymenttechbed
 
Free EJB Tutorial | VirtualNuggets
Free EJB Tutorial | VirtualNuggetsFree EJB Tutorial | VirtualNuggets
Free EJB Tutorial | VirtualNuggetsVirtual Nuggets
 
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
 
Oracle Cloud Compute - EBS 12.2.5 Vision Demo - Technical Discussion
Oracle Cloud Compute - EBS 12.2.5 Vision Demo - Technical DiscussionOracle Cloud Compute - EBS 12.2.5 Vision Demo - Technical Discussion
Oracle Cloud Compute - EBS 12.2.5 Vision Demo - Technical DiscussionJoshua Johnson, MIS
 

Semelhante a Lab 6) package and deploy a j2 ee application (20)

Lab 5b) create a java server faces application
Lab 5b) create a java server faces applicationLab 5b) create a java server faces application
Lab 5b) create a java server faces application
 
Lab 7b) test a web application
Lab 7b) test a web applicationLab 7b) test a web application
Lab 7b) test a web application
 
Lab 3) create a web application
Lab 3) create a web applicationLab 3) create a web application
Lab 3) create a web application
 
Part 3 web development
Part 3 web developmentPart 3 web development
Part 3 web development
 
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
 
F7 wc9 zu3701lsg_ai
F7 wc9 zu3701lsg_aiF7 wc9 zu3701lsg_ai
F7 wc9 zu3701lsg_ai
 
Part 5 running java applications
Part 5 running java applicationsPart 5 running java applications
Part 5 running java applications
 
Lab 5a) create a struts application
Lab 5a) create a struts applicationLab 5a) create a struts application
Lab 5a) create a struts application
 
WebLogic FAQs
WebLogic FAQsWebLogic FAQs
WebLogic FAQs
 
Resourceslab fixed
Resourceslab fixedResourceslab fixed
Resourceslab fixed
 
Tivoli perfviewer
Tivoli perfviewerTivoli perfviewer
Tivoli perfviewer
 
Jsf tutorial
Jsf tutorialJsf tutorial
Jsf tutorial
 
Java tutorial
Java tutorialJava tutorial
Java tutorial
 
J introtojava1-pdf
J introtojava1-pdfJ introtojava1-pdf
J introtojava1-pdf
 
Part 7 packaging and deployment
Part 7 packaging and deploymentPart 7 packaging and deployment
Part 7 packaging and deployment
 
Free EJB Tutorial | VirtualNuggets
Free EJB Tutorial | VirtualNuggetsFree EJB Tutorial | VirtualNuggets
Free EJB Tutorial | VirtualNuggets
 
Tutorial for netbeans
Tutorial for netbeansTutorial for netbeans
Tutorial for netbeans
 
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...
 
Fp201 unit1 1
Fp201 unit1 1Fp201 unit1 1
Fp201 unit1 1
 
Oracle Cloud Compute - EBS 12.2.5 Vision Demo - Technical Discussion
Oracle Cloud Compute - EBS 12.2.5 Vision Demo - Technical DiscussionOracle Cloud Compute - EBS 12.2.5 Vision Demo - Technical Discussion
Oracle Cloud Compute - EBS 12.2.5 Vision Demo - Technical Discussion
 

Mais de techbed

1456.base boot
1456.base boot1456.base boot
1456.base boottechbed
 
1455.ata atapi standards - 1-7
1455.ata atapi standards - 1-71455.ata atapi standards - 1-7
1455.ata atapi standards - 1-7techbed
 
1454.ata features
1454.ata features1454.ata features
1454.ata featurestechbed
 
1432.encoding concepts
1432.encoding concepts1432.encoding concepts
1432.encoding conceptstechbed
 
Flash cs4 tutorials_2009
Flash cs4 tutorials_2009Flash cs4 tutorials_2009
Flash cs4 tutorials_2009techbed
 
Photoshop tut
Photoshop tutPhotoshop tut
Photoshop tuttechbed
 
What is struts_en
What is struts_enWhat is struts_en
What is struts_entechbed
 
First java-server-faces-tutorial-en
First java-server-faces-tutorial-enFirst java-server-faces-tutorial-en
First java-server-faces-tutorial-entechbed
 
Part 4 working with databases
Part 4 working with databasesPart 4 working with databases
Part 4 working with databasestechbed
 
Lab 1) rad installation
Lab 1) rad installationLab 1) rad installation
Lab 1) rad installationtechbed
 
6) debugging and testing
6) debugging and testing6) debugging and testing
6) debugging and testingtechbed
 
7) packaging and deployment
7) packaging and deployment7) packaging and deployment
7) packaging and deploymenttechbed
 
5) running applications
5) running applications5) running applications
5) running applicationstechbed
 
4) databases
4) databases4) databases
4) databasestechbed
 
3) web development
3) web development3) web development
3) web developmenttechbed
 
2009 ibm academic initiative
2009 ibm academic initiative2009 ibm academic initiative
2009 ibm academic initiativetechbed
 
2) java development
2) java development2) java development
2) java developmenttechbed
 

Mais de techbed (17)

1456.base boot
1456.base boot1456.base boot
1456.base boot
 
1455.ata atapi standards - 1-7
1455.ata atapi standards - 1-71455.ata atapi standards - 1-7
1455.ata atapi standards - 1-7
 
1454.ata features
1454.ata features1454.ata features
1454.ata features
 
1432.encoding concepts
1432.encoding concepts1432.encoding concepts
1432.encoding concepts
 
Flash cs4 tutorials_2009
Flash cs4 tutorials_2009Flash cs4 tutorials_2009
Flash cs4 tutorials_2009
 
Photoshop tut
Photoshop tutPhotoshop tut
Photoshop tut
 
What is struts_en
What is struts_enWhat is struts_en
What is struts_en
 
First java-server-faces-tutorial-en
First java-server-faces-tutorial-enFirst java-server-faces-tutorial-en
First java-server-faces-tutorial-en
 
Part 4 working with databases
Part 4 working with databasesPart 4 working with databases
Part 4 working with databases
 
Lab 1) rad installation
Lab 1) rad installationLab 1) rad installation
Lab 1) rad installation
 
6) debugging and testing
6) debugging and testing6) debugging and testing
6) debugging and testing
 
7) packaging and deployment
7) packaging and deployment7) packaging and deployment
7) packaging and deployment
 
5) running applications
5) running applications5) running applications
5) running applications
 
4) databases
4) databases4) databases
4) databases
 
3) web development
3) web development3) web development
3) web development
 
2009 ibm academic initiative
2009 ibm academic initiative2009 ibm academic initiative
2009 ibm academic initiative
 
2) java development
2) java development2) java development
2) java development
 

Último

Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfPoh-Sun Goh
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...christianmathematics
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxVishalSingh1417
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhikauryashika82
 
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-IIFood Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-IIShubhangi Sonawane
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDThiyagu K
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptxMaritesTamaniVerdade
 
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Shubhangi Sonawane
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfAyushMahapatra5
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfChris Hunter
 
Role Of Transgenic Animal In Target Validation-1.pptx
Role Of Transgenic Animal In Target Validation-1.pptxRole Of Transgenic Animal In Target Validation-1.pptx
Role Of Transgenic Animal In Target Validation-1.pptxNikitaBankoti2
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.MaryamAhmad92
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxVishalSingh1417
 
Energy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural Resources
Energy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural ResourcesEnergy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural Resources
Energy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural ResourcesShubhangi Sonawane
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...Poonam Aher Patil
 

Último (20)

Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-IIFood Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdf
 
Role Of Transgenic Animal In Target Validation-1.pptx
Role Of Transgenic Animal In Target Validation-1.pptxRole Of Transgenic Animal In Target Validation-1.pptx
Role Of Transgenic Animal In Target Validation-1.pptx
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
Energy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural Resources
Energy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural ResourcesEnergy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural Resources
Energy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural Resources
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 

Lab 6) package and deploy a j2 ee application

  • 1. V4.1 Instructor Exercises Guide 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. © Copyright IBM Corp. 2004, 2007 Exercise 13. Package and Deploy a J2EE Application 13-1 Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
  • 2. Instructor Exercises Guide 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. 13-2 Developing Web Applications © Copyright IBM Corp. 2004, 2007 Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
  • 3. V4.1 Instructor Exercises Guide 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 © Copyright IBM Corp. 2004, 2007 Exercise 13. Package and Deploy a J2EE Application 13-3 Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
  • 4. Instructor Exercises Guide 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. 13-4 Developing Web Applications © Copyright IBM Corp. 2004, 2007 Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
  • 5. V4.1 Instructor Exercises Guide 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. © Copyright IBM Corp. 2004, 2007 Exercise 13. Package and Deploy a J2EE Application 13-5 Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
  • 6. Instructor Exercises Guide __ 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 13-6 Developing Web Applications © Copyright IBM Corp. 2004, 2007 Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
  • 7. V4.1 Instructor Exercises Guide 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 © Copyright IBM Corp. 2004, 2007 Exercise 13. Package and Deploy a J2EE Application 13-7 Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
  • 8. Instructor Exercises Guide 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. 13-8 Developing Web Applications © Copyright IBM Corp. 2004, 2007 Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
  • 9. V4.1 Instructor Exercises Guide 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. © Copyright IBM Corp. 2004, 2007 Exercise 13. Package and Deploy a J2EE Application 13-9 Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
  • 10. Instructor Exercises Guide 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 13-10 Developing Web Applications © Copyright IBM Corp. 2004, 2007 Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
  • 11. V4.1 Instructor Exercises Guide 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 © Copyright IBM Corp. 2004, 2007 Exercise 13. Package and Deploy a J2EE Application 13-11 Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
  • 12. Instructor Exercises Guide 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-12 Developing Web Applications © Copyright IBM Corp. 2004, 2007 Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
  • 13. V4.1 Instructor Exercises Guide 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 © Copyright IBM Corp. 2004, 2007 Exercise 13. Package and Deploy a J2EE Application 13-13 Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
  • 14. Instructor Exercises Guide the module to performing installation tasks. Look for the following message to confirm that the enterprise application was successfully installed. 13-14 Developing Web Applications © Copyright IBM Corp. 2004, 2007 Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
  • 15. V4.1 Instructor Exercises Guide 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. © Copyright IBM Corp. 2004, 2007 Exercise 13. Package and Deploy a J2EE Application 13-15 Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
  • 16. Instructor Exercises Guide 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. 13-16 Developing Web Applications © Copyright IBM Corp. 2004, 2007 Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
  • 17. V4.1 Instructor Exercises Guide 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. © Copyright IBM Corp. 2004, 2007 Exercise 13. Package and Deploy a J2EE Application 13-17 Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
  • 18. Instructor Exercises Guide __ 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. 13-18 Developing Web Applications © Copyright IBM Corp. 2004, 2007 Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
  • 19. V4.1 Instructor Exercises Guide EXempty END OF LAB © Copyright IBM Corp. 2004, 2007 Exercise 13. Package and Deploy a J2EE Application 13-19 Course materials may not be reproduced in whole or in part without the prior written permission of IBM.