Configuration

Oracle Application Server 10 g provides a highly configurable JSP container. While the application server comes preconfigured to run JSPs, there are a number of configuration parameters and features that are of particular interest to developers. This section will cover some of the features that are common to other J2EE containers as well as some that are specific to Oracle Application Server 10 g .

Most of the configuration options for JSPs are available through the Oracle Enterprise Manager Application Server Control web site. This is good for applications that are ready for deployment to an Oracle Application Server 10 g instance. However, Oracle JDeveloper 10 g and OC4J stand-alone applications only provide access to the configuration via the configuration files. It is important that developers know how to access and change these parameters during development.

To set the Oracle JSP Container Properties, log into OEM and navigate to the OC4J instance you wish to modify by clicking on the OC4J instance name. To access the administration page for the selected instance, click on the Administration link located at either the top or bottom of the page. Once you are on the Administration page, select the JSP Container Properties link under the Instance Properties section to access the available JSP properties. From this page, you can modify any of the JSP properties for this instance. The global-web-application.xml file, located under the instance s config directory, is the file that is updated for all JSP configuration properties. The JSP servlet must be updated using the init-param element. The param- name and param-value elements should be added for each of the parameters that need to be modified. The excerpt below, from the global-web-applciation.xml file, shows how to set the emit_debug_info parameter to true:

 <servlet>      <servlet-name>jsp</servlet-name>      <servlet-class>oracle.jsp.runtimev2.JspServlet</servlet-class> <init-param> <param-name>emit_debuginfo</param-name> <param-value>true</param-value> </init-param> . </servlet> 

Table 14-4 describes the available properties, their purpose, valid values, and the property name that is updated:

Table 14-4: JSP OEM Properties

JSP OEM Property

Valid Values
[ ] = default

Property Name

Description

Debug Mode

[false] true

debug_mode

Causes a stack trace to be displayed when a run-time exception occurs. Valid values are true or false.

Emit Debug Info

[false]true

emit_debuginfo

Creates a line map from the JSPs for debugging.

External Resource for Static Content

[false]true

external_resource

When set to true, all static content for the JSPs will be placed in a separate Java resource file during page translation.

When a JSP Changes

[recompile]justrun

main_mode

This setting tells the JSP engine how to handle changed JSPs. By default, the server is set to recompile. To have the JSP save the resources expended checking for updated JSPs, set this value to justrun.

Generate Static Text as Bytes

[false]true

static_text_in_chars

By default, static text is generated as bytes. To have static text generated as characters , set this value to true.

Precompile Check

[false]true

precompile_check

Set this Boolean to true to check the HTTP request for a standard jsp_precompile setting. The default is false.

Tags Reuse Default

[runtime]compiletime
compiletime_with_
release

tags_reuse_default

This specifies a default setting for JSP tag handler pooling (true to enable by default; false to disable by default). You can override this default setting for any particular JSP page. The default is true.

Reduce Code Size for Custom Tags

[false]true

reduce_tag_code

Set this Boolean to true for further reduction in the size of generated code for custom tag usage. The default is false.



Oracle Application Server 10g Web Development
Oracle Application Server 10g Web Development (Oracle Press)
ISBN: 0072255110
EAN: 2147483647
Year: 2004
Pages: 192

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net