All Examples  All WebLogic Enterprise Connectivity Examples

package examples.wlec.servlets.university

Class Index

WebLogic Enterprise Connectivity servlet university example

  • UniversityServlet
  • about this example

    This example demonstrates how to use WebLogic Enterprise Connectivity to access a WebLogic Enterprise CORBA object from a servlet on a WebLogic Server. The example uses WebLogic JHTML and the WebLogic PageCompileServlet.

    1. At startup:

    2. At runtime, the HTML client sends a request and input string to a JHTML servlet:

    3. Acting as a WebLogic Enterprise client, the JHTML servlet:

    4. The University object performs the specified operation and returns the results to the JHTML servlet. The University object can perform the following operations:

    5. The PageCompileServlet compiles the results into a dynamically generated HTML page and sends the page to the HTML client.

    how to use this example

    Prerequisites

    Install and set up WebLogic Server, JDK, and WebLogic Enterprise. See WebLogic platform support for information about the supported versions for each of these products.

    Setting up the example

    1. Build and run the WebLogic Enterprise University Transactions sample.

      See The Transactions Sample Application in the WebLogic Enterprise documentation.

      You can optionally use the C++ version of the sample, which uses C++ client stubs instead of Java client stubs. If you use the C++ version, you must run the idltojava compiler on the .idl files to generate Java client stubs. For information about manually generating client stubs, see Creating CORBA Client Applications in the WebLogic Enterprise documentation. You can get the idltojava compiler from Sun's Java IDL Web page. The idltojava compiler must be run on a computer with a C++ development environment, since it runs the C precompiler on the .idl source.

    2. Set up your development environment as described in Setting your development environment.

    3. Copy the WebLogic Enterprise Transactions University client stubs to your WebLogic Server SERVER_CLASSES directory, with a command like this one for Windows NT:
        $ COPY univ_dir/transactions/UniversityT/*.class %SERVER_CLASSES%

      where univ_dir is the location of the WebLogic Enterprise University sample.

    4. Compile UniversityServlet.java with a command like this one for Windows NT:
        $ javac -d %SERVLET_CLASSES% *.java

    5. Copy the .html and .jhtml files into your registered document root, which defaults to myserver/public_html.

    6. Initialize an IIOP session pool by modifying the weblogic.properties file.

      See the Administrators Guide Setting up WebLogic Enterprise Connectivity. You can uncomment and edit the weblogic.CORBA.connectionPool.Univpool property in the weblogic.properties file.

    7. Set up JHTML by modifying the weblogic.properties file.

      For information about configuring JHTML and the weblogic.properties file, see the Service-related properties in the WebLogic Administrators Guide.

    Running the example

    1. Start the WebLogic Server in your server shell.

    2. Start a Web browser and enter the URL for UniversityForm.html, for example http://localhost:7001/UniversityForm.html.

    3. On the HTML form:

    4. Watch for the results.

    there's more...

    Read more about installing, configuring, and using WebLogic Enterprise Connectivity in:

    Copyright © 1999 BEA Systems, Inc. All rights reserved.

    Last updated 9/15/1999