This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Create JSP Document with following code: 1: <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0"> 2: <jsp:text> 3: <text> 4: <head> 5: <title>aaa</title> 6: </head> 7: </text> 8: </jsp:text> 9: </jsp:root> Add breakpoint to line 4 and start debugger. Debugger will stop on line 5 and if you press F8 debugger will jump to line 8. Modify above code, change line 5 to 5: aaa Start debugger. Now debugger will stop on right line and F8 works correctly. However if you put breakpoint to line 3, debugger will stop on line 4. Corresponding servlet code for first example is: out.write('\n'); out.write("<text>"); out.write("<head>"); out.write("<title>"); out.write('a'); out.write('a'); out.write('a'); out.write("</title>"); out.write("</head>"); out.write("</text>"); out.write('\n'); and for modified example: out.write('\n'); out.write("<text>"); out.write("<head>"); out.write("\n"); out.write("aaa\n"); out.write("</head>"); out.write("</text>"); out.write('\n'); There is also other jspx, which can't be almost debugged. Mount jsp-examples from Tomcat, open jsp2/jspx/basic.jspx, set breakpoint to line 10 and start debugger. Debugger will not stop on breakpoint. If you set breakpoint to line 5, debugger will stop on line 4 and after F8 you will get out of source so content of this jspx can't be debugged at all.
As for case 1 - this is a problem of JSR45 mappings generated by Tomcat. There are no mappings for skipped lines - so debugger can't do anything else - just skip those lines. This is correct functionality of JSR45 debugger which depends on support from server. As for case 2 - we are not able to debug tag files, and this example consists only from a custom tag call written in a tag file, so we're still providing a consistent behaviour here. So, marking as will not fix.
If it can't be fixed I would consider possibility to disable debugging for JSPX at all. We can discuss it at today meeting.
Which case are you talking about now?
Especially case 1, but also case 2 if JSPX containing one big custom tag is common use.
I do consider case 2 as invalid - because the text there is something like a parameter in the function call - you can't step through parameters in function call. Case 1 is a little problem in missing Tomcat mappings (not our code) - not a P2, because some of the mappings in the text do not exist, so we do skip them. However, case 3 is really a P2 and is serious. It's again a problem in Tomcat mappings, so our code is innocent here ;O) - I'm gonna file a bug against Tomcat (I already sent an email to Kin-Man) and attach the number here. Case3: <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0"> <jsp:text> <text> Sample text </text> </jsp:text> <jsp:scriptlet> <![CDATA[ String s = "hehehe"; System.out.print("s = " + s); //comment out.print("last"); ]]> </jsp:scriptlet> <h1> <jsp:scriptlet> <![CDATA[ for(int i = 0 ; i < 10; i++) { System.out.println("debug: " + i); } ]]> </jsp:scriptlet> </h1> </jsp:root> Here, when you get to step in the for-loop, you're looping between CDATA and for lines, which is completely weird.
Tomcat bug: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=27338
KinMan fixed the bug in Tomcat. I'm gonna try it with T's nightly build.
I verified it works OK with nightly T build.
Case 1 was fixed in Tomcat, too. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=27368
What's the status? Will this need a release note?
Yes, this will need a release note. Status is: both relevant problems were fixed on Tomcat side, and will be part of Tomcat 5.0.next release (5.0.20, I believe). So, I'm going to follow the process and send a waiver request.
Chris, could you work with Martin on a description of this bug and any relevant workarounds?
The same bug applies to SunOne AppServer so release note should also mention it.
Suggested Text: Lines Stepped Over in JSP Document files (.jspx) During Debugging Due to known server bugs, not all JSP lines are mapped to the corresponding servlet code. Therefore, the debugger steps over some lines in JSP Document files. Breakpoints are not honored on these skipped lines and the debugger will step over them when you press F8.
I would also mention in release notes that next version of Tomcat should have this bug fixed so user can register next version of Tomcat in IDE as new server and use it.
Can we be more specific about the "next version"? Do we know the version number?
It should be 5.0.20, but it wasn't release yet.
Let us know when it is released. I don't want to change the release notes before that.
It's been fixed in trunk by upgrade to T5.0.24 and it's fixed in PE8.0.1 or something like that, so marking as fixed.
Verified.