Solutions Products Services

Search
Download Contact Us
Documentation Site map
Support About Us
E-commerce SolutionsiPlanet



Creating a JavaServer Page

You are now ready to create a simple HelloWorld web application. In Forte, web applications must reside within a web module. If you have not created a web module, please follow the instructions in Creating a Web Module.

To create a Java Server Page HelloWorld application:

  1. In the FlleSystems pane of the Explorer, select the newly created web module directory.
  2. Right click and select New | JSP & Servlet | JSP.

  3. When the new Template wizard appears, enter Hello as the name and don't add an extension.

    JSPs must be created within a web module but must reside outside of the WEB-INF directory of the web module.

    The Hello.jsp file is created and added to the web module. The Source Editor window is also displayed showing the default structure of the Hello.jsp file.

  4. In the source editor, enter Hello there! into the Hello.jsp file in a new line after the <body> tag.

  5. From the Explorer window, select the WEB-INF node.
  6. Right click to display the context menu and select Properties.
  7. In the Properties tab, verify the Context Root field is set to the folder that you identified for the path to your web module (e.g., WebModule).
  8. Close the Properties window.
  9. From the Explorer window Runtime tab, navigate to the virtual server instance you wish to deploy the JSP to and right click to select the instance as default.
  10. From the Explorer window Filesystems tab, select the Hello JSP node.
  11. From the Build menu, select Deploy.

    The IDE Content status bar indicates the successful deployment of this web module to the target virtual server instance.

  12. Select the Hello.jsp node once more and right click to select Execute.

    Forte switches to the Running view and displays status messages in the status bar that the Web Server Engines are starting. Additionally, Forte also displays an Output window.

    A WAR file is created and deployed to the iPlanet Web Server default virtual server instance.

    You can see the output information in either the Output window or the IDE status bar under the Content menu.

    When the execution is completed, the browser launches and points to the proper URL to view the page. For example, http://serverinstance:80/WebModule/Hello.jsp.

    If the Hello.jsp file does not display in the browser, check the WEB-INF Properties sheet Context Root setting to make sure it identifies the WebModule directory.

    If you switch to a different browser, be sure to identify the desired browser from the Tools menu | Options | JSP & Servlet Properties Web Browser settings.

The next step in the iPlanet Web Server Integration Module Tutorial is creating a Servlet.

 
   

Legal Notices


Search