facebook

debugging jsps with tomcat 5.0.16 [Closed]

  1. MyEclipse Archived
  2.  > 
  3. Bugs
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #200527 Reply

    bobash
    Member

    eclipse 2.1.2
    myeclipse 2.6.4
    tomcat 5.0.16

    User Guide, Web Development Tutorial part 2, Step 5:
    Once the breakpoint is set, the debugger stops at the top of the jsp page instead of at the line with the breakpoint.

    It works with tomcat 5.0.14.

    #200532 Reply

    Scott Anderson
    Participant

    I believe this is a known problem with the latest release of Tomcat due to changes in their launch model. It should be resolved in the upcoming 2.7 release. Sorry for the inconvenience.

    –Scott
    MyEclipse Support

    #200540 Reply

    Scott Anderson
    Participant

    We did some research and the problem is a bug in the SMAP generated by the latest version of the Tomcat beta. We’ve submitted the source mapping problem as a bug against Tomcat here:
    http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25263

    –Scott
    MyEclipse Support

    #200578 Reply

    Scott Anderson
    Participant

    The Apache folks have followed up in the bug thread and they’re working on a fix for the next Tomcat release. More importantly though, they’ve given us a workaround. You need to modify your <TomcatConfigDir>/conf/web.xml file to turn on the mappedfile attribute in the JSP servlet. When you do that, it should basically look like this:

    
        <servlet>
            <servlet-name>jsp</servlet-name>
            <servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class>
            <init-param>
                <param-name>fork</param-name>
                <param-value>false</param-value>
            </init-param>
            <init-param>
                <param-name>xpoweredBy</param-name>
                <param-value>false</param-value>
            </init-param>
            <init-param>
                <param-name>mappedfile</param-name>
                <param-value>true</param-value>
            </init-param>
            <load-on-startup>3</load-on-startup>
        </servlet>
    

    Then, clear out all the working files under the directory <TomcatConfigDir>/work/Catalina/localhost/<your-web-project> to force Tomcat to recompile all your JSP’s the next time they’re run. Once Tomcat is restarted and your pages are hit again the breakpoints should now map to the JSP source code properly.

    –Scott
    MyEclipse Support

    #202741 Reply

    mrzeld
    Member

    was this issued resolved (so you dont have to add to your web.xml the snippet above) with ME 2.7RC2 and tomcat 5.0.18?

    #202745 Reply

    Riyad Kalla
    Member

    mrzeld,
    Yes I believe it was as I’ve suggested to a few people to upgrade after complaining about this bug, and never gotten a reply back… which I can only assume means its worked.

    #204427 Reply

    Riyad Kalla
    Member

    I am closing this because it was a bug in Tomcat that was fixed a while ago.

Viewing 7 posts - 1 through 7 (of 7 total)
Reply To: debugging jsps with tomcat 5.0.16 [Closed]

You must be logged in to post in the forum log in