WebLogic Server 6.0 Code Examples, BEA Systems, Inc.

examples.wlec.servlets.simpapp
Class SimpappServlet

java.lang.Object
  |
  +--javax.servlet.GenericServlet
        |
        +--javax.servlet.http.HttpServlet
              |
              +--examples.wlec.servlets.simpapp.SimpappServlet
All Implemented Interfaces:
java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class SimpappServlet
extends javax.servlet.http.HttpServlet

This example demonstrates how a WebLogic Servlet can connect to WebLogic Enterprise and invoke an operation on a CORBA object. It should be invoked from the Simpapp.html file.

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

Field Summary
(package private)  java.lang.String defaultCase
           
(package private)  java.lang.String defaultString
           
(package private) static SimpleFactory simple_factory_ref
           
 
Constructor Summary
SimpappServlet()
           
 
Method Summary
 java.lang.String getServletInfo()
          Basic servlet info.
 void init(javax.servlet.ServletConfig config)
          Initializes the servlet.
 void service(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
          A simple implementation of the service method, in which we get the IOR for Simple object, invoke the tolower or toupper method (as requested by the user), construct a servlet page, and print the user string in uppercase or lowercase.
 
Methods inherited from class javax.servlet.http.HttpServlet
, doDelete, doGet, doOptions, doPost, doPut, doTrace, getLastModified, service
 
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletName, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

defaultCase

final java.lang.String defaultCase

defaultString

final java.lang.String defaultString

simple_factory_ref

static SimpleFactory simple_factory_ref
Constructor Detail

SimpappServlet

public SimpappServlet()
Method Detail

getServletInfo

public java.lang.String getServletInfo()
Basic servlet info.
Overrides:
getServletInfo in class javax.servlet.GenericServlet

init

public void init(javax.servlet.ServletConfig config)
          throws javax.servlet.ServletException
Initializes the servlet. Here, we get the Bootstrap object, the Factory Finder and the Simple factory during the startup.
Overrides:
init in class javax.servlet.GenericServlet
Parameters:
config - Servlet configuration
Throws:
javax.servlet.ServletException - if the servlet fails

service

public void service(javax.servlet.http.HttpServletRequest req,
                    javax.servlet.http.HttpServletResponse res)
             throws javax.servlet.ServletException,
                    java.io.IOException
A simple implementation of the service method, in which we get the IOR for Simple object, invoke the tolower or toupper method (as requested by the user), construct a servlet page, and print the user string in uppercase or lowercase. See the provided Simpapp.html for the HTML form used to submit the data.
Overrides:
service in class javax.servlet.http.HttpServlet

Documentation is available at
http://e-docs.bea.com/wls/docs60

Copyright © 2000 BEA Systems, Inc. All Rights Reserved.