    All Examples  All EJB Examples  This Package

## Class examples.ejb.basic.beanManaged.Servlet

    examples.ejb.basic.beanManaged.Servlet

public class Servlet

This servlet is a program similar to that in the examples.ejb.basic.beanManaged.Client example.

The servlet must be registered in the `weblogic.properties` file of the WebLogic Server:

`weblogic.httpd.register.beanManaged=examples.ejb.basic.beanManaged.Servlet` `weblogic.allow.execute.weblogic.servlet.beanManaged=servletUser` `weblogic.password.servletUser=servletUserPassword`

Call this servlet using an URL such as

`http://localhost:7001/beanManaged?user=servletUser&password=servletUserPassword`

where you've substituted appropriate values for servletUser and servletUserPassword in both the `weblogic.properties` file and the URL.

##

Servlet()

##

getInitialContext()
  Gets an initial context for the current user, password and url.
getServletInfo()
  Basic servlet information.
service(HttpServletRequest, HttpServletResponse)
  Builds an HTML page, finds the beanManaged home, creates beans and calls methods on the bean's remote interfaces.

##

Servlet

    public Servlet()

##

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.
  Parameters:
    `req` - HttpServletRequest
    `res` - HttpServletResponse
  Throws:
    java.io.IOException - if there is an IO error

getServletInfo

    public java.lang.String getServletInfo()

Basic servlet information.

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

    All Examples  All EJB Examples  This Package