The document discusses the architecture and components used to serve web requests in Oracle Application Server. Apache is used as the web listener and supports modules like mod_plsql and mod_jserv. Mod_plsql allows generating dynamic HTML from PL/SQL code directly in the database. Mod_jserv runs Java servlets and JSPs. The web request flows from the client to the Apache listener, then to authentication modules, before being routed to mod_plsql, mod_jserv or backend databases to generate and return dynamic content to the client.
1 of 8
More Related Content
PL WEB
1. i AS: Single Integrated Product 8 i Cache Browser Apache mod PL/SQL mod jserv JDK Servlets Files Oracle8 i HTTP/ HTTPS Forms Reports Discoverer EJB Servlets PL/SQL SQL mod_ose EJB Servlets PL/SQL SQL Database Cache mod_rewrite
2. Why Apache ? De-Facto Standard Web Listener Over 59% market share today Serves as the HTTP entry point to i AS Scalable Replicate across many middle tier nodes Load-balanced access through network load balancers (Local / Distributed Director, IP round robin, etc.) Extensible Delegate handling of HTTP requests to mods
3. Apache “ Mods” Standard and Oracle “Mods” modJserv: Stateless Servlets in JVM pools modRewrite : Rerouting/writing of requests modPerl : Perl script processing modPLSQL: Stateless PL/SQL modSSL: Supported SSL modAuth : Authentication services
4. mod_plsql Generates HTML files from PL/SQL code. Allows dynamic creation of web content from inside the database, including serving images and documents. Is the replacement for the PL/SQL Cartridge in OAS and earlier versions of Oracle WebServer. Enabler of many 11i Self-Service Modules and Oracle Portal Client Apache Listener PL/SQL Engine Generates HTML Oracle 8i/9i mod_plsql
5. Example PL/SQL Code for mod_plsql create or replace procedure TestHTMLPage is begin htp.htmlOpen; -- prints <HTML> htp.headOpen; -- prints <HEAD> htp.title(‘Test HTML Page’); -- prints <TITLE> htp.headClose; -- prints </HEAD> htp.bodyOpen; -- prints <BODY> htp.tableOpen(‘border=2’); -- prints <TABLE…> htp.tableRowOpen; -- prints <TR> htp.tableData(‘This will be in the 1 st column’); htp.tableRowClose; htp.tableRowOpen; htp.tableData(‘This will be in the 2 nd column’); htp.tableRowClose; htp.tableClose; htp.bodyClose; htp.htmlClose; -- prints </HTML> end;
6. mod_JServ Like mod_plsql, but for running Java code, specifically servlets and JSPs (Java Server Pages) The java runs in Java Virtual Machine (JVM) configured for Apache
7. Example Servlet Code public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType("text/html"); PrintWriter out = new PrintWriter (response.getOutputStream()); out.println("<html>"); out.println("<head><title>Test HTML Page</title></head>"); out.println("<body>"); out.println(“<table border=2>”); out.println(“<tr>”); out.println(“<td>This will be in the 1 st column</td>”); out.println(“<td>This will be in the 2 nd column</td>”); out.println(“</tr>”); out.println(“</table>”); out.println(“</body>”); out.close(); }
iAS Layout This provides a snapshot of the building blocks that make up iAS. Apache 8i Cache Forms Reports Discoverer
Web Request Flow 1. A listener/dispatcher receives an HTTP request from a client. If the request is for an Apache modules, the request is handled by the corresponding module. The listener examines the URL and determines which cartridge should handle the request. If the request is for a static document then it is handle by the listener itself, via the http core functionality. 2. Request for non static files such as security, redirection, CGI, Perl, Java Servlets, SSI and other applications is handle by the corresponding module. 3. Request handle by the mod_Jserv, such as Jservlets and JSP are pass from the mod_jserv module to a separate process running a JVM, Java Virtual Machine. This is service by yet another process ( on a separate port). 4. JVM executes the Java Servlet/JSP and returns the html to the mod_jserv. 5. The apache core, http code, code return the resulting html page.