Deploying and Running the Application


NOTE - Before you deploy a J2EE application that accesses a database, amke sure the database is running.

Before deploying the application, you will set up a Servlet Context for the Web Module. Subsequently, you are ready to deploy, run, and examine the debugging facilities of the IDE.

Define the Context Root for the Web Module

The context root provides a way to distinguish resources in your application from resources in other applications deployed to the same server instance. You set the servlet context on the included web module's property sheet. With this value, end users will be able to access the servlets at http://hostname:port/servlet_context/servlet_name.

To define the context root of the web module:

  1. In the IDE, click the Explorer's Filesystem tab.
  2. Expand the mysimple filesystem and the application's node.
  3. Select the web module and display its property sheet.
  4. Type a name for the servlet context in the Web Context field.

Deploy the Application

To deploy the application:

  1. Right-click the application's node and choose Deploy.
  2. Several views appear in the output window while a Progress Monitor window shows the deployment progress. Wait for the Progress Monitor to close automatically.


    NOTE - If the deployment step fails, try the following:


Run the Application

Point your web browser to the index.html page to start the application. Once the web page is displayed, enter your name and click the Process button.

To run the application:

  1. From your operating system, launch a web browser and point it to the following URL:
  2. http://localhost/servlet_context/index.html

    When the web browser connects to the server, the server1: access view in the output window displays a new line.

  3. Enter a name and click Process in the web browser.
  4. As the servlet, EJB, and JSP page are executed, the output of System.out.println statements are displayed in the server1: server.log view in the output window.

  5. Click the here link to display a log as generated by the bean_nameLogView.jsp JSP page.
  6. More entries are appended in the output window.


    NOTE - If this step fails, try the following:



Legal Notices