Bruce,

To see where the "-g" comes from, see:

<http://cvs.apache.org/viewcvs/jakarta-tomcat/src/share/org/apache/jasper/compiler/SunJavaCompiler.java?rev=1.2.4.1&content-type=text/vnd.viewcvs-markup>

Since the invocation of the Java compiler is under the control
of Jasper, you don't have much control over the arguments it is
passed.

After giving it a quick try with Tomcat 3.2.4, it appears the
conf/web.xml is out of date with respect to the JSP servlet.
The correct class name is org.apache.jasper.servlet.JspServlet.
The following worked for me:

    <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>
        <load-on-startup>
                -2147483646
        </load-on-startup>
    </servlet>
    ...
    <servlet-mapping>
        <servlet-name>
            jsp
        </servlet-name>
        <url-pattern>
            *.jsp
        </url-pattern>
    </servlet-mapping>

Cheers,
Larry

> -----Original Message-----
> From: Bruce Dahms [mailto:[EMAIL PROTECTED]] 
> Sent: Monday, November 18, 2002 12:59 PM
> To: 'Tomcat Users List'
> Subject: RE: Debugging JSPs using Tomcat 3.2.3 and NetBeans 3.3.2
> 
> 
> Hi Larry:
> 
> Thanks for that tip. Unfortunately, I'm still not able to set 
> this working.
> It's strange because I can debug an ordinary servlet (e.g., 
> one that comes
> with Tomcat), but I can't debug a servlet created by Jasper.  
> 
> Do you have any other suggestions?  Can I put a CLASSDEBUG 
> attribute in the
> SERVER.XML file (I can't tell since it doesn't have a DTD)?  Do I have
> anything missing from the Java command line I'm using to 
> start Tomcat?  I
> tried adding "-Xint" but that didn't help.  Is there a Jasper 
> configuration
> file I can modify?  I believe I just need to add a "-g" to 
> the Javac command
> line that creates the compiled servlet, but I don't know how 
> to do that.
> 
> Thanks in advance.
> 
> Bruce
> 
> > -----Original Message-----
> > From: Larry Isaacs [mailto:[EMAIL PROTECTED]]
> > Sent: Friday, November 15, 2002 07:11
> > To: Tomcat Users List
> > Subject: RE: Debugging JSPs using Tomcat 3.2.3 and NetBeans 3.3.2
> > 
> > 
> > Reading of the "conf/web.xml" go turned off for Tomcat 3.2.x,
> > though the file is still present.  You should add the XML
> > below to the "WEB-INF/web.xml" for the webapps you want to
> > debug.
> > 
> > Cheers,
> > Larry
> > 
> > > -----Original Message-----
> > > From: Bruce Dahms [mailto:[EMAIL PROTECTED]] 
> > > Sent: Thursday, November 14, 2002 4:28 PM
> > > To: [EMAIL PROTECTED]
> > > Subject: Debugging JSPs using Tomcat 3.2.3 and NetBeans 3.3.2
> > > 
> > > 
> > > I'm using NetBeans 3.3.2 with an EXTERNAL instance of Tomcat 
> > > 3.2.3.  I'm 
> > > trying to configure Tomcat so I can watch JSP variables and 
> > > expressions.  
> > > Here is how I'm starting Tomcat:
> > > 
> > >  start "Tomcat 3.2.3" 
> > >        "C:\Java\1.3.0_02\bin\java" -classic -Xdebug 
> > >        -Xnoagent -Djava.compiler=NONE 
> > >        
> > -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8888 
> > >        -Dtomcat.home="C:\jakarta-tomcat-3.2.3" 
> > >        org.apache.tomcat.startup.Tomcat
> > > 
> > > Once Tomcat is running, I can attach to it from NetBeans via 
> > > dt_socket on 
> > > port 8888.  I can then mount the compiled servlet in 
> NetBeans, set 
> > > a breakpoint, and execute up to that breakpoint.  What I 
> > cannot do is 
> > > watch variables or expressions.  If I specify a variable 
> to watch, 
> > > NetBeans tells me the "Identifier cannot be resolved."  
> > > 
> > > At the top of the variables list in the NetBeans debugger 
> window is 
> > > the message "source compiled without -g option."  This 
> leads me to 
> > > believe Tomcat isn't creating the servlet with the required 
> > > debugging information.  I enabled the "classdebuginfo" 
> parameter in 
> > > Tomcat's WEB.XML, but this seems to have no effect.  Here's 
> > > an excerpt:
> > > 
> > >  <servlet>
> > >    <servlet-name>jsp</servlet-name>
> > >    
> > <servlet-class>org.apache.jasper.runtime.JspServlet</servlet-class>
> > >    <init-param>
> > >      <param-name>classdebuginfo</param-name>
> > >      <param-value>true</param-value>
> > >    </init-param>
> > >    <load-on-startup>-2147483646</load-on-startup>
> > >  </servlet>
> > >  <servlet-mapping>
> > >    <servlet-name>jsp</servlet-name>
> > >    <url-pattern>*.jsp</url-pattern>
> > >  </servlet-mapping>
> > > 
> > > Any suggestions?  The application I'm using requires Tomcat 
> > 3.2.3.  I 
> > > cannot use a different version of Tomcat.
> > > 
> > > Bruce
>  
> 
> This communication is intended for the use of the recipient 
> to which it is
> addressed, and may contain confidential, personal and or privileged
> information. Please contact us immediately if you are not the intended
> recipient of this communication, and do not copy, distribute, 
> or take action
> relying on it. Any communication received in error, or 
> subsequent reply,
> should be deleted or destroyed.
> 
> 
> --
> To unsubscribe, e-mail:   
> <mailto:tomcat-user-> [EMAIL PROTECTED]>
> For 
> additional commands, 
> e-mail: <mailto:[EMAIL PROTECTED]>
> 
> 

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to