2 Replies Latest reply on Dec 17, 2003 9:01 PM by muralikd

    jsp Debugging problem

    tracker09

      Hi, I'm having a lot of trouble debuggin my jsp's. I'm using JBoss 3.0.8 that came with Jetty. The problem is that I cannot seem to get my generated java souce files (generated forom the jsp's) to go to the right directory. They go to a temp directory. Since I am uswing Lomboz and Eclipse I could like to put them into the j2src directory in my Eclipse project. Does anyone know what I have to do to the configuration to make this work?

        • 1. Re: jsp Debugging problem
          jonlee

          Add to your JAVA_OPTS:

          -Djava.io.tmpdir=/j2src

          Or wherever your directory is located. However, the actual generated source will appear several directories down. I'm not sure if this is the desired effect.

          • 2. Re: jsp Debugging problem
            muralikd

            I'm in a similar boat- while I've made some progress, I'm not quite there yet, i.e. I can't yet step into my JSP/Servlet code.

            The Lomboz web site has the information that got me started
            (http://www.objectlearn.com/support/docs/debuggingJSP.jsp), but it's absolutely minimal, and I couldn't find much help in the JBoss ($99 annual subscription) docs either!

            I modified the entry for jasper JSP servlet in the file webdefault.xml under \server\all\deploy\jbossweb.sar:


            <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>keepgenerated</param-name>
            <param-value>true</param-value>
            </init-param>
            <init-param>
            <param-name>logVerbosityLevel</param-name>
            <param-value>DEBUG</param-value>
            </init-param>
            <init-param>
            <param-name>mappedfile</param-name>
            <param-value>true</param-value>
            </init-param>
            <init-param>
            <param-name>scratchdir</param-name>
            <param-value>JspServletSrc</param-value>
            </init-param>
            <load-on-startup>0</load-on-startup>


            That helped - except it put the generated servlet code under JBossHome/bin/JspServletSrc (so the scratchdir param seems to be relative to the JBoss bin directory).

            One problem in debugging the generated servlets is eclipse is that they are under the org.apache.jsp package but the generated directory structure does not mirror the package structure. However, the problem was fixed by downloading and installing the Sysdeo patch for Tomcat plugin from here
            http://www.sysdeo.com/eclipse/tomcatPlugin.html
            Just make sure the zip file is before the Jasper compiler in the JBoss server's runtime classpath.


            I even added the following entry to jboss-web.xml, under
            \server\all\deploy\http-invoker.sar\invoker.war\WEB-INF
            (note, backslashes for the windows file system):

            <context-root path="/myweb"
            docbase="C:\Program Files\Eclipse\eclipse\workspace\myweb\myjsp"
            workDir="C:\Program Files\Eclipse\eclipse\workspace\myweb\j2src"/>

            That didn't seem to do anything at all.

            If you can figure out how to make the generated classes go under the eclipse workspace automatically, please let me know!

            Thanks,
            Murali