Previous  Table of Contents  Next  

  J2EE Tools - Lightweight IDE for J2EE Version 1.4  
     
 

GETTING STARTED

Build, Deploy and Run Hello 2 Web Application

This page describes how to build, deploy and run the Hello 2 web application in the J2EE Tutorial.
  1. Browse Hello 2 Web Application in J2EE Tutorial:

    1. Click Help | J2EE Tutorial in the J2EE Tools window.
    2. Wait until the J2EE Tutorial appears in the browser window.
    3. Scroll to Chapter 3: Getting Started with Web Applications then scroll to and click Configuring Web Applications.
    4. When done browsing, click X in the top right corner of the browser window.
  2. Build Hello 2 Web Application:

    1. Click the Application tab in the J2EE Tools window.
    2. Click the Project Directory box in the Application tab then click web in the popup list.
    3. Click the Application Directory box then click hello2.
    4. Click the Build File box then click build.xml (default).
    5. Click the Build Target box then click build (default).
    6. Click Tools | Build.
    7. Wait until Build Successful appears in the Build Target window.
    8. Click X in the top right corner of the Build Target window.
  3. Start Application Server:

    1. Click Tools | Application Server | Start in the J2EE Tools window.
    2. Wait until Application server startup complete appears in the Start Application Server window.
    3. If the domain window appears, click _ (minimize) in the top right corner of the domain window.
  4. Create Hello 2 Web Application Web Archive File:

    1. Click Tools | Deployment | Console in the J2EE Tools window.
    2. Wait until the Deployment Tool window appears.
    3. Click File | New | Web Component in the Deployment Tool window.
    4. Click Next in the New Web Application Wizard - Introduction dialog.
    5. Click Create New Stand-Alone WAR Module in the New Web Application Wizard - WAR File dialog.
    6. Click Browse to the right of the WAR Location field.
    7. Click Up One Level in the Create Module File dialog until Local Disk (C:) appears in the Look In box.
    8. Double click the fieldbird directory in the Look In area.
    9. Double click the j2eetools directory in the Look In area.
    10. Double click the j2ee directory in the Look In area.
    11. Double click the projects directory in the j2ee directory.
    12. Double click the web directory in the projects directory.
    13. Double click the hello2 directory in the web directory.
    14. Click the File Name field then type hello2.war.
    15. Click Create Module File.
    16. Verify that the WAR Location field in the New Web Application Wizard - WAR File dialog contains C:\fieldbird\j2eetools\j2ee\projects\web\hello2\hello2.war.
    17. Click the WAR Name field then type hello2.
    18. Click the Context Root field then type /hello2.
    19. Click Edit Contents.
    20. Verify that the Starting Directory box in the Edit Contents dialog contains C:\fieldbird\j2eetools\j2ee\projects\web\hello2.
    21. Double click the build directory in the Available Files area.
    22. Click the servlets directory in the build directory in the Available Files area then click Add.
    23. Click the duke.waving.gif file in the build directory then click Add.
    24. Click OK.
    25. Click Next in New Web Application Wizard - WAR File dialog.
    26. Click Servlet in the New Web Application Wizard - Choose Component Type dialog.
    27. Click Next.
    28. Click the Servlet Class box in the New Web Application Wizard - Component General Properties dialog then click servlets.GreetingServlet in the popup list.
    29. Click Finish.
  5. Add Other Servlet to Hello 2 Web Application Web Archive File:

    1. Click File | New | Web Component in the Deployment Tool window.
    2. Click Next in the New Web Application Wizard - Introduction dialog.
    3. Click Add to Existing WAR Module in the New Web Application Wizard - WAR File dialog.
    4. Click the Add to Existing WAR Module box then click hello2.
    5. Click Next.
    6. Click Servlet in the New Web Application Wizard - Choose Component Type dialog.
    7. Click Next.
    8. Click the Servlet Class box in the New Web Application Wizard - Component General Properties dialog then click servlets.ResponseServlet in the popup list.
    9. Click Finish.
  6. Add Servlet Aliases to Hello 2 Web Application Web Archive File:

    1. Click GreetingServlet under hello2 on the left side of the Deployment Tool window.
    2. Click the Aliases tab on the right side of the Deployment Tool window.
    3. Click Add in the Aliases tab.
    4. Click the field under Aliases then type /greeting and press the Enter key.
    5. Click ResponseServlet under hello2 on the left side of the Deployment Tool window.
    6. Click the Aliases tab on the right side of the Deployment Tool window.
    7. Click Add in the Aliases tab.
    8. Click the field under Aliases then type /response and press the Enter key.
    9. Click File | Save in the Deployment Tool window.
    10. Click File | Exit.
  7. Deploy Hello 2 Web Application Web Archive File on Application Server:

    1. Click Tools | Deployment | Deploy in the J2EE Tools window.
    2. Wait until Command deploy executed successfully appears in the Deploy Archive File window.
    3. Click X in the top right corner of the Deploy Archive File window.
  8. Run Hello 2 Web Application Web Client:

    1. Click Tools | Arguments in the J2EE Tools window.
    2. Type /greeting in the Input dialog then OK.
    3. Click Tools | Run | Web Client.
    4. Wait until the Hello page appears in the browser window.
    5. Click the field under Hello, my name is Duke. What's yours? then type World and click Submit.
    6. Wait until Hello, World! appears at the bottom of the browser window.
    7. When done entering names, click X in the top right corner of the browser window.
  9. Undeploy Hello 2 Web Application Web Archive File on Application Server:

    1. Click Tools | Deployment | Undeploy in the J2EE Tools window.
    2. Wait until Command undeploy executed successfully appears in the Undeploy Archive File window.
    3. Click X in the top right corner of the Undeploy Archive File window.
  10. Stop Application Server:

    1. Click Tools | Application Server | Stop in the J2EE Tools window.
    2. Wait until JMS service shutdown complete appears in the Start Application Server window.
    3. Click X in the top right corner of the Start Application Server window.
    4. Click X in the top right corner of the Stop Application Server window.
 

 
Get J2EE Tools from Field Bird at SourceForge.net Previous  Table of Contents  Next