All Examples This Package
Class examples.htmlkona.HelloWorld
java.lang.Object
|
+----javax.servlet.GenericServlet
|
+----javax.servlet.http.HttpServlet
|
+----examples.htmlkona.HelloWorld
- public class HelloWorld
- extends HttpServlet
This example demonstrates the creation of a simple servlet
with htmlKona that displays an HTML page when invoked from
a Java-enabled server. This page displays "Hello world!"
To run this example, edit the defaults.java file to set
local environment names and variables. Then compile
this directory, register the servlets in your T3Server's
weblogic.properties file, and use a URL to
invoke the servlet. There are more instructions on setting
up the WebLogic Server as an HTTP server and registering servlets
in the WebLogic Server Administrator's Guide,
Setting
up the WebLogic Server as an HTTP server
- Author:
- Copyright (c) 1996-1998 by WebLogic, Inc. All Rights Reserved.
- Copyright (c) 1999-2000 by BEA Systems, Inc. All Rights Reserved.
-
HelloWorld()
-
-
service(HttpServletRequest, HttpServletResponse)
- The service method is where the real work is done in a
HTTP servlet.
HelloWorld
public HelloWorld()
service
public synchronized void service(HttpServletRequest req,
HttpServletResponse res) throws IOException
- The service method is where the real work is done in a
HTTP servlet. In this method, we set the page type,
and then construct the page with htmlKona components. Finally, we
call the output() method with the results of the
HttpServletResponse.getOutputStream() method.
- Parameters:
- req - HttpServletRequest object
- res - HttpServletResponse object
- Throws: IOException
- if there is a transfer error
- Overrides:
- service in class HttpServlet
All Examples This Package