- This topic has 13 replies, 6 voices, and was last updated 20 years, 8 months ago by support-michael.
-
AuthorPosts
-
tiscMemberHi 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?
Scott AndersonParticipantWhen 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.
tiscMember@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.
Riyad KallaMemberTino,
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?
tiscMember@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.
Riyad KallaMemberThank you for the report Timo, I’ll forward this on to the authorities on bugs.
Scott AndersonParticipant(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?
tiscMemberI 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.
Scott AndersonParticipantDid 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.
goetterwindMemberDon’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.
Riyad KallaMemberScott/Goetterwind
Was this fixed in 2.7 GA?
Scott AndersonParticipantNope, this one remains open at present.
glennmaughanMemberI 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.
support-michaelKeymasterGlenn,
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?
-
AuthorPosts