WebLogic Server 6.0 Code Examples, BEA Systems, Inc.

examples.ejb20.basic.beanManaged
Class Servlet

java.lang.Object
  |
  +--javax.servlet.GenericServlet
        |
        +--javax.servlet.http.HttpServlet
              |
              +--examples.ejb20.basic.beanManaged.Servlet
All Implemented Interfaces:
java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class Servlet
extends javax.servlet.http.HttpServlet

This servlet is a program similar to the examples.ejb20.basic.beanManaged.Client example.

Call this servlet using an URL such as

http://localhost:7001/examplesWebApp/beanManaged

Author:
Adapted by WebLogic, Inc.; adaptions copyright (c) 1998 by WebLogic, Inc. All Rights Reserved.,
Adapted by BEA Systems, Inc.; adaptions copyright (c) 1998-2000 by BEA Systems, Inc. All Rights Reserved.

Field Summary
(package private) static java.lang.String accountId
           
 
Constructor Summary
Servlet()
           
 
Method Summary
static javax.naming.Context getInitialContext()
          Gets an initial context for the current user, password and url.
 java.lang.String getServletInfo()
          Basic servlet information.
 void service(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
          Builds an HTML page, finds the beanManaged home, creates beans and calls methods on the bean's remote interfaces.
 
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, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

accountId

static java.lang.String accountId
Constructor Detail

Servlet

public Servlet()
Method Detail

getInitialContext

public static javax.naming.Context getInitialContext()
                                              throws java.lang.Exception
Gets an initial context for the current user, password and url.
Returns:
Context
Throws:
java.lang.Exception - if there is an error in getting the Context

getServletInfo

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

service

public void service(javax.servlet.http.HttpServletRequest req,
                    javax.servlet.http.HttpServletResponse res)
             throws java.io.IOException
Builds an HTML page, finds the beanManaged home, creates beans and calls methods on the bean's remote interfaces.
Overrides:
service in class javax.servlet.http.HttpServlet
Parameters:
req - HttpServletRequest
res - HttpServletResponse
Throws:
java.io.IOException - if there is an IO error

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

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