[ Team LiB ] Previous Section Next Section

Deploying a JSP

Deploying a JavaServer Page is much like deploying an HTML page. A JSP will compile to a servlet, but unlike a servlet, it does not require any specific registration. You simply copy it into the root directory of the deployed Web application. The following steps will guide you through the deployment of a JSP:

  1. Start the administration server.

  2. Copy your JSP file into the default Web application directory of your WebLogic Server installation. You can create a Web Application, and set the default Web Application through the WebLogic Administration Console. For illustrative purposes, we will name this file bar.jsp. We'll deploy our JSP file into this directory:

    
    
    C:/bea/user_projects/mydomain/applications/DefaultWebApp
    
  3. Copy all of your supporting files, such as image or media files, into the /DefaultWebApp directory. You can create subdirectories (such as /images/mypic.gif) to handle any relative links.

  4. You'll now be able to view the HTML page in a Web browser by using the following URL:

    http://127.0.0.1:7001/DefaultWebApp/bar.jsp

    where

    localhost is the name of the WebLogic Server hosting the JSP page. If you deployed the JSP page on a remote machine, you would substitute the IP address or machine name of the other server for this name.

    port is the listening address for the server.

    bar.jsp is the name of the JSP file you copied to the server in step 2.

    [ Team LiB ] Previous Section Next Section