All Examples All WebLogic Enterprise Connectivity Examples This Package
Class examples.wlec.servlets.simpapp.SimpappServlet
examples.wlec.servlets.simpapp.SimpappServlet
- public class SimpappServlet
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.
-
SimpappServlet()
-
-
getServletInfo()
- Basic servlet info.
-
init(ServletConfig)
- Initializes the servlet.
-
service(HttpServletRequest, HttpServletResponse)
- 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.
SimpappServlet
public SimpappServlet()
init
public void init(ServletConfig config) throws ServletException
- Initializes the servlet. Here, we get the Bootstrap
object, the Factory Finder and the Simple factory
during the startup.
- Parameters:
- config - Servlet configuration
- Throws: ServletException
- if the servlet fails
service
public void service(HttpServletRequest req,
HttpServletResponse res) throws ServletException, 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.
getServletInfo
public String getServletInfo()
- Basic servlet info.
All Examples All WebLogic Enterprise Connectivity Examples This Package