Blog maintained by TechnoGems

Saturday, August 16, 2008

Viewing JSP Stack Traces with OC4J 10.1.3.1.

When an error occurs in the translation or runtime execution of a JSP page, the container would return the exception, message and a stacktrace to the client. However, the exception is not displayed in the page by default in OC4j.

This can be a little annoying for development machines. There are several ways to change this behavior. The easiest way is to set the development flag at the container level. This can be done by updating the element of the global-web-application.xml file.

Here is an example:

<orion-web-app
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://xmlns.oracle.com/oracleas/schema/orion-web-10_0.xsd"
jsp-cache-directory="./persistence"
servlet-webdir="/servlet"
development="true"
jsp-timeout="0"
jsp-cache-tlds="standard"
schema-major-version="10"
schema-minor-version="0"
>


I like this option because, this can be set once for the container and dont have to worry about it.

If this cannot be done because you are working on a shared server, you can override individually by setting this flag on the application level by including orion-web.xml file in WEB-INF directory of your application. However, you have to make sure you remove this or change it when you deploy to production.

As a temporery measure, you can change it during deployment on the jdeveloper deployment wizard. The "Buttso Blathers" has a screen shot of this screen.

1 comment:

for IT the said...

I have read your blog its very attractive and impressive. I like it your blog.

Java Training in Chennai Core Java Training in Chennai Core Java Training in Chennai

Java Online Training Java Online Training Core Java 8 Training in Chennai Core java 8 online training JavaEE Training in Chennai Java EE Training in Chennai