Subject: How to Set Up OSE to Listen and Respond to HTTP Requests Creation Date: 01-DEC-2000 Purpose: ======== The purpose of this article is to show you the necessary steps to configure Oracle Servlet Engine (OSE) so that it is capable of responding to http requests. Scope & Application: ==================== This article can help all database administrators to create basic web services in their database which will be ready to deploy more complex servlet applications. How to Set Up OSE to Listen and Respond to HTTP Requests: ========================================================= A prerequisite requirement is to have Oracle JServer loaded in the database. Use the dbassist utility if your database is not Java-enabled. Follow the steps below to set up http service in your database. 1. To create http service in your database, connect to your database using the sess_sh utility. For example, $ sess_sh -s sess_iiop://localhost:2481:T817 -u sys/change_on_install 2. When you connect, you can use the scripts bootwebserver.ssh and serverendp.ssh which are found in the $ORACLE_HOME/jis/install directory to create the initial layout for http://webserver service. Type the following commands: (If needed, prefix these commands with the correct path.) $ @bootwebserver.ssh test $ @serverendp.ssh webserver 8000 9000 $ exit Look at the headers of these script files to find the meaning of the script's parameters. These scripts create the new HTTP service, a new servlet domain, and endpoints where this service listens. 3. Create and publish the new demo servlet which is to be accessible through the created service. 1) Use a text editor to create file Hello.java with the following code and save it in a directory named test. --------------------- Code starts here --------------------- package test; import javax.servlet.*; import javax.servlet.http.*; import java.io.*; import java.util.*; public class Hello extends HttpServlet { public void init(ServletConfig config) throws ServletException { super.init(config); } public void doGet(HttpServletRequest request, HttpServletResponse response) th rows ServletException, IOException { response.setContentType("text/html"); PrintWriter out = new PrintWriter (response.getOutputStream()); out.println(""); out.println("