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.
- When the Weblogic Application Server comes up,
it opens multiple connections to the WebLogic Enterprise IIOP listener.
- At the initialization phase of the servlet, it picks up a connection from the
the connection pool; that is, it acts as a WebLogic Enterprise client and gets a client context
from the bootstrap factory.
- The servlet then finds the factory finder and gets the
Simple factory.
- When the user submits the form, the IOR for the
Simple object is obtained from the Simple factory and the toupper/tolower
operation is invoked. (The user specifies "TO UPPER" or
"TO LOWER" in Simpapp.html.)
This request goes through the ISL/ISH to the appropriate server in the WebLogic Enterprise domain.
- The server converts the string and sends it back to the servlet.
- The servlet returns the converted string to the client
browser within some generated HTML.
- Author:
- Copyright (c) 1999-2000 BEA Systems, Inc. All rights reserved.
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 |
defaultCase
final java.lang.String defaultCase
defaultString
final java.lang.String defaultString
simple_factory_ref
static SimpleFactory simple_factory_ref
SimpappServlet
public SimpappServlet()
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
Copyright © 2000 BEA Systems, Inc. All Rights Reserved.