facebook

Problems debugging JSPs with includes/fragments [Closed]

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

    tisc
    Member

    Hi there,

    I’m currently struggling with debugging a JSP which includes a fragment.

    I have MyEclipse 3.7RC2 ontop of a fresh Eclipse 3.0M6 running on Linux.
    Tomcat is 5.0.14 (I also added the mappedfile attribute to server.xml as suggested elsewhere).

    The top-level JSP is parentcat2dlg.jsp; it includes

    <%@ include file="core2include.jspf" %>

    which in turn includes

    <%@ include file="include.jspf" %>

    When I set a breakpoint in parentcat2dlg.jsp after the include statement, the breakpoint is actually set into the include.jspf. That is, there is no way to set a breakpoint exactly after the include statement above. Therefore, I have to step through the includes first and will, after all, return to parentcat2dlg.jsp at the right location (just after the include).

    Bye, Tino.

    PS: What’s the state of the JSPs-with-underscores issue?

    #201847 Reply

    Scott Anderson
    Participant

    When I set a breakpoint in parentcat2dlg.jsp after the include statement, the breakpoint is actually set into the include.jspf.

    Interesting. Have you tried settting the breakpoint a few lines further down? You can set it on an HTML line too, for example. Does that work?

    PS: What’s the state of the JSPs-with-underscores issue?

    Still shows open. Should be in the next release.

    #201889 Reply

    tisc
    Member

    @scott wrote:

    When I set a breakpoint in parentcat2dlg.jsp after the include statement, the breakpoint is actually set into the include.jspf.

    Interesting. Have you tried settting the breakpoint a few lines further down? You can set it on an HTML line too, for example. Does that work?

    No, it doesn’t work. If I set a breakpoint at line 43 in parentcat2dlg.jsp, it is hit in include.jspf at line 43. Line numbers simply get mixed up. If I set a breakpoint further down (to a line number greater than the length of include.jspf), it works.

    Hm. Maybe I’ll try a newer Tomcat. Maybe it messes up the mapping?

    Bye, Tino.

    #201900 Reply

    Riyad Kalla
    Member

    Tino,
    There was a bug with Tomcat 5.0.16 that caused a problem with the line mappings. Can you try grabbing a nightly build of the current tomcat and see if that works?

    #201905 Reply

    tisc
    Member

    @support-rkalla wrote:

    Tino,
    There was a bug with Tomcat 5.0.16 that caused a problem with the line mappings. Can you try grabbing a nightly build of the current tomcat and see if that works?

    At first, I used Tomcat 5.0.14… I now tried the last nightly build (20040114) but the problem remains (I also tried the mappedfile attribute in Tomcat’s web.xml…).

    There is another issue (also with both Tomcats): If I set a breakpoint within a tag, the debugger stops correctly but points to the start of the tag. e.g.:

    
    <core:dialog someattrs... >
    <%-- some stuff, other tags etc. --%
    <core:sqlloop ... >
    <% 
      String message = "debugger sees this variable but points to start of <core:dialog> tag";
      out.println (message);
    %>
    </core:sqlloop>
    </core:dialog>
    

    Bye, Tino.

    #201909 Reply

    Riyad Kalla
    Member

    Thank you for the report Timo, I’ll forward this on to the authorities on bugs.

    #201969 Reply

    Scott Anderson
    Participant

    (I also added the mappedfile attribute to server.xml as suggested elsewhere).

    The mappedfile attribute goes in web.xml 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>
    

    Could you please check your configuration again? I’ve been using 5.0.16 with this setup and it seems to behave correctly. You’re not deploying with your own ant script, precomiling, or anything like that are you?

    #201983 Reply

    tisc
    Member

    I have the mappedfile attribute in web.xml, of course. I’m deploying using MyEclipse. Nothing fancy so far. I’ll try to come up with a simple self-contained test case.

    #203446 Reply

    Scott Anderson
    Participant

    Did you ever manage to create a simple test case of this issue? It would be valuable for testing the 2.7 GA version just to ensure the issue has been addressed.

    #203845 Reply

    goetterwind
    Member

    Don’t know if this has anything to do with it…
    My myeclipse/eclipse/tomcat5.18 didn’t recognize files *.jspf as jsp’s and so they weren’t compiled on the server.

    #204432 Reply

    Riyad Kalla
    Member

    Scott/Goetterwind

    Was this fixed in 2.7 GA?

    #204442 Reply

    Scott Anderson
    Participant

    Nope, this one remains open at present.

    #205469 Reply

    glennmaughan
    Member

    I have the same problem using Weblogic Server 7.0, an Ant script for deployment and our JSP fragments are named ‘.inc’.

    We do not use a “mapped-file” option in web.xml. Is this required for Weblogic? What does it do?

    Thanks.
    Glenn.

    #205486 Reply

    support-michael
    Keymaster

    Glenn,

    1) does your WLS deployment include a weblogic.xml descriptor with debugging enabled?

    2) are you setting breakpoints in the top-level jsps instead of your jsp fragements?

Viewing 14 posts - 1 through 14 (of 14 total)
Reply To: Problems debugging JSPs with includes/fragments [Closed]

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