Debugging JSP with Jetty and Idea

I have an application which does other things and also starts a Jetty webserver. It serves JSP pages using jetty.

1) I can debug the appplication by connecting to it using remote debugging options

2) Can some one please let me know how can I debug the JSP pages served by the application.

1 comment
Comment actions Permalink

Hi Haneef,

I'm trying to do the same thing. I'm using Jetty 5.0RC2 with
JDK1.4.2_05 and IDEA 4.5.

Haneef wrote:

I have an application which does other things and also starts a Jetty webserver. It serves JSP pages using jetty.

1) I can debug the appplication by connecting to it using remote debugging options


I can debug the application normally by setting a break point and
running the app under the debugger.

I was having problems with Jetty raising anonymous JasperExceptions and
needed to debug into JSPServletWrapper so I downloaded the source to the
Apache Jasper compiler and dropped it in the project. I can now step
right down to the call to theServlet.service( request, response ).

2) Can some one please let me know how can I debug the JSP pages served by the application.


This is where I am stumped right now. I can't step into the servlet
compiled from the JSP.

To have the servlet generated with debugging info when using Tomcat you
add the following to your web.xml:

<servlet>
<servlet-name>jsp</servlet-name>
<servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class>
<init-param>
<param-name>classdebuginfo</param-name>
<param-value>true</param-value>
</init-param>
<init-param>
<param-name>logVerbosityLevel</param-name>
<param-value>DEBUG</param-value>
</init-param>
<load-on-startup>3</load-on-startup>
</servlet>


I tried this with Jetty but it fails complaining that you are redefining
the jsp servlet. I'm still looking for the Jetty based solution.

BTW A good resource for Jetty is:

news://news.gmane.org:119/gmane.comp.java.jetty.support

Regards,

Matt

0

Please sign in to leave a comment.