    All Examples  All Jolt Examples  All Jolt Servlet Examples  This Package

# Class examples.jolt.servlet.simpapp.SimpAppServlet

    javax.servlet.GenericServlet
       |
       +----javax.servlet.http.HttpServlet
               |
               +----examples.jolt.servlet.simpapp.SimpAppServlet

public class SimpAppServlet
extends HttpServlet

This example demonstrates how a WebLogic Servlet may connect to TUXEDO and call upon one of its services; it should be invoked from the simpapp.html file. The servlet creates a session pool manager at initialization, which is used to obtain a session when the doPost method is invoked. This session is used to connect to a service in TUXEDO with a name described by the posted "SVCNAME" argument. In this example the service is called "TOUPPER", which transposes the posted "STRING" argument text into uppercase, and returns the result. This is returned to the client browser within some generated HTML.

THIS IS SOURCE CODE PUBLISHED FOR DEMONSTRATION PURPOSES.

Author:
  Copyright (c) 1998-2000 BEA Systems, Inc. All rights reserved.

##

SimpAppServlet()

##

destroy()
  Destroys this servlet.
doGet(HttpServletRequest, HttpServletResponse)
  Implements the `doGet()` HttpServlet method.
doPost(HttpServletRequest, HttpServletResponse)
  Implements the HttpServlet `doPost()` method.
init(ServletConfig)
  Initializes the servlet.

##

SimpAppServlet

     public SimpAppServlet()

##

init

     public void init(ServletConfig config) throws ServletException

  Initializes the servlet. The session pool manager and the simpapp session pool have been established during the startup.

  Parameters:
    config - Servlet configuration
  Throws: ServletException
    if the servlet fails
  Overrides:
    init in class GenericServlet

destroy

     public void destroy()

  Destroys this servlet. The ServletSessionPoolManager resource is deallocated.

  Overrides:
    destroy in class GenericServlet

doPost

     public void doPost(HttpServletRequest req,
                        HttpServletResponse resp) throws ServletException, IOException

  Implements the HttpServlet `doPost()` method. This method expects POSTed arguments for:
  "SVCNAME"
    The name of the service to be invoked in TUXEDO.
  "STRING"
    The text to be transposed to UPPER CASE.

  See the provided simpapp.html for the HTML form used to submit the data.

  Overrides:
    doPost in class HttpServlet

doGet

     public void doGet(HttpServletRequest req,
                       HttpServletResponse resp) throws ServletException, IOException

  Implements the `doGet()` HttpServlet method. This simply invokes the `doPost()` method.

  Overrides:
    doGet in class HttpServlet

    All Examples  All Jolt Examples  All Jolt Servlet Examples  This Package