---
title: "Debugging JSPs in Eclipse using OC4J"
author: "palmer"
date: "2010-05-07T06:22:01Z"
tags: []
categories: ["编程语言"]
slug: "debugging-jsps-in-eclipse-using-oc4j"
draft: false
lastmod: "2010-05-07T23:22:42Z"
id: 660856
url: "https://palmer.iteye.com/blog/660856"
---

To set break points and debug JSPs in Eclipse using the OC4J app server, you have to configure OC4J. 

Edit the file c:\\oracle\\oc4j\\j2ee\\home\\config\\global-web-application.xml and change the configuration for the OC4J JSP servlet handler to:

```
<servlet>
      <servlet-name>jsp</servlet-name>
      <servlet-class>oracle.jsp.runtimev2.JspServlet</servlet-class>
      <!-- you can set main_mode to "justrun" to speed up
           JSP dispatching, if you don't need to recompile
           your JSP anymore. You can always switch your
           main_mode. Please see our doc for details -->
      <!--
      <init-param>
        <param-name>main_mode</param-name>
        <param-value>justrun</param-value>
      </init-param>
      -->

      <!-- Add these parms to debug JSPs -->
      <init-param>
        <param-name>debug</param-name>
        <param-value>class</param-value>
      </init-param>
      <init-param>
        <param-name>debug_mode</param-name>
        <param-value>true</param-value>
      </init-param>
      <init-param>
        <param-name>developer_mode</param-name>
        <param-value>true</param-value>
      </init-param>
      <init-param>
        <param-name>encode_to_java</param-name>
        <param-value>true</param-value>
      </init-param>
      <init-param>
        <param-name>emit_debuginfo</param-name>
        <param-value>true</param-value>
      </init-param>
      <!-- End of debug parms -->

      <load-on-startup>0</load-on-startup>
    </servlet>
```

 

After changing the configuration file and restarting the OC4J server in debug mode, I was able to stop execution in JSPs.

 

 

参见 http://www.xinotes.org/notes/note/204/