HomeOracle Page 4 - Configuring J2EE Application XML Files
Web Module - Oracle
In this fourth part of a series covering the management of OC4J and configuring J2EE applications with Oracle 10g Application Server, we take a closer look at at J2EE application deployment files and more. This article is excerpted from chapter eight of the Oracle 10g Application Server Exam Guide, written by Sam Alapati (McGraw-Hill; ISBN: 0072262710).
There are two Web-related XML files, one of which is the J2EE-specific XML file and the other, the OC4J-specific XML file.
J2EE web.xml All servlets, EJBs, and JSPs that are part of the J2EE application are described in the J2EE web.xml file. Here are the contents of a typical web.xml file:
<web-app> <display-name>myapp web application</display-name> <description> Web module that contains an HTML welcome page, and 4 JSP's. </description> <welcome-file-list> <welcome-file>index.html</welcome-file> </welcome-file-list> <ejb-ref> <ejb-ref-name>TemplateBean</ejb-ref-name> <ejb-ref-type>Entity</ejb-ref-type> <home>TemplateHome</home> <remote>Template</remote> </ejb-ref> <servlet> <servlet-name>template</servlet-name> <servlet-class>TemplateServlet</servlet-class> <init-param> <param-name>length</param-name> <param-value>1</param-value> </init-param> </servlet> </web-app>
OC4J-Specific orion-web.xml The orion-web.xml file contains the mappings for Web settings. Here are important items that are part of this file: