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.

Bug 76385 - Variable display in JSP files gone missing
Summary: Variable display in JSP files gone missing
Status: VERIFIED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: Debugger (show other bugs)
Version: 5.x
Hardware: PC All
: P1 blocker with 1 vote (vote)
Assignee: Martin Entlicher
URL:
Keywords: REGRESSION
: 151329 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-05-15 15:44 UTC by ssteiner
Modified: 2008-10-31 16:51 UTC (History)
5 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
null value on jsp debug (NB 6.5 RC1) (2.37 KB, image/jpeg)
2008-10-24 19:24 UTC, nsegura3
Details
non-null value on jsp debug (NB 6.5 M1) (2.66 KB, image/jpeg)
2008-10-24 19:25 UTC, nsegura3
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ssteiner 2006-05-15 15:44:28 UTC
I am quite confident to say that this used to work just fine. While debugging a
jsp page, when hovering woith the mouse over a variable, its contents would be
shown. However, since I upgraded to NB 5.0, I no longer have this useful feature
and have to activate the local variables window to see the contents of any
variable in the current scope.
Comment 1 Libor Kotouc 2006-06-16 15:53:10 UTC
Can you please verify this feature in one of the NetBeans 5.5 builds?

There were two issues fixed at the end of the last year (if you are interested,
see the issue 66850 and the issue 67277.

If the problem still persists, please attach the JSP file where you have the
problem, also provide JDK version and the steps to reproduce (the part of the
JSP page text being selected).
Comment 2 Libor Kotouc 2007-01-11 12:04:02 UTC
no response from the reporter for a long time.
Comment 3 ssteiner 2007-02-21 10:15:39 UTC
Sorry for the long delay. The problem still exists in NB 5.5

Here's a small JSP page that you can use to reproduce:

<%@page language="java" import="java.net.InetAddress"%><%
   
    String thisServer = InetAddress.getLocalHost().getHostAddress();
    String thisPath = request.getRequestURI();
    String thisPort = String.valueOf(request.getServerPort());
    String baseURL = "http://" + thisServer + ":" + thisPort + thisPath;
    String basePath = baseURL.substring(0, baseURL.lastIndexOf("/")) + "/";
    out.println("The base url is " + baseURL);
    out.println("the base path is " + basePath);
    %>

Set a breakpoint at any line, and hover over any of the variables.. you'll get
nothing. 
As mentioned, the bug has existed since NB5 so I've gone through a bunch of JDKs
- currently I'm using jdk1.5.0_09.
Comment 4 Pavlo Tymoshenko 2007-08-22 20:03:47 UTC
works pretty fine
Comment 5 ssteiner 2007-11-09 15:58:42 UTC
I'm afraid I cannot concurr with that assessment... I just installed 6.0 beta 2 and I still don't have the usual 
variable value display when overing over any of my variables in the test document (thisServer, thisPath, thisPort, 
baseURL or basePath)
Comment 6 pslechta 2008-08-22 14:32:43 UTC
The functionality works in NB 6.5 trunk build with GlassFish V2.
Closing as WORKSFORME, reporter please feel free to reopen if you still have problems with it...
Comment 7 ssteiner 2008-09-05 12:48:58 UTC
This may have something to do with it.. you're using Glassfish.. I'm using Tomcat (at the time I'm writing this 6.0.16).
Can you check if it also works (with my sample page) using Tomcat that comes bundled with Netbeans?
Comment 8 pslechta 2008-09-05 13:11:04 UTC
Will check it with Tomcat later today... and will update this issue.
Comment 9 pslechta 2008-09-05 14:39:21 UTC
Now it does not work for me either... :-(
I do not see variable values with Tomcat nor with Glassfish...

Product Version: NetBeans IDE Dev (Build 200809040201)
Java: 1.6.0; Java HotSpot(TM) Client VM 1.6.0-b105
System: Windows XP version 5.1 running on x86; Cp1252; en_US (nb)
Comment 10 pslechta 2008-10-02 11:51:27 UTC
Product Version: NetBeans IDE Dev (Build 080926)
Java: 1.6.0; Java HotSpot(TM) Client VM 1.6.0-b105
System: Windows XP version 5.1 running on x86; Cp1252; en_US (nb)

Works fine for me after changing the example little bit (insert enter after @page tag:

<%@page language="java" import="java.net.InetAddress"%>
<%
    String thisServer = InetAddress.getLocalHost().getHostAddress();
    String thisPath = request.getRequestURI();
    String thisPort = String.valueOf(request.getServerPort());
    String baseURL = "http://" + thisServer + ":" + thisPort + thisPath;
    String basePath = baseURL.substring(0, baseURL.lastIndexOf("/")) + "/";
    out.println("The base url is " + baseURL);
    out.println("the base path is " + basePath);
%>

After this change I can see all variables. Reporter, can you confirm this behavior?
Comment 11 ssteiner 2008-10-02 13:51:50 UTC
I can confirm this behavior even with the release NB 6.1..  I also tried it on some of my more complex JSP files and it
still works. Since the resulting JSP file is correct in both cases I take it that it's still an NB issue but knowing the
behavior is different if there's an enter hopefully will help in narrowing down what is going wrong.
Comment 12 nsegura3 2008-10-24 19:24:07 UTC
Created attachment 72626 [details]
null value on jsp debug (NB 6.5 RC1)
Comment 13 nsegura3 2008-10-24 19:25:07 UTC
Created attachment 72628 [details]
non-null value on jsp debug (NB 6.5 M1)
Comment 14 nsegura3 2008-10-24 19:26:01 UTC
IN 6.5 this used to work for me in Milestone 1 with no problems. Same code, same app, same process does not work in RC1,
and did not work in the October 10  development version I have. When I hover the mouse over a variable, it shows ()null.
Watches do not work either, they always show null values. They work with no problem in Milestone 1.

The erroneous behavior is very consistent, it never works in the latest versions. Somewhere between milestone 1 and the
october 10 dev release it got broken.

Please see the attached screens for an example.
Comment 15 _ wadechandler 2008-10-25 01:17:00 UTC
nsegura3 are you able to work around the issue as mentioned in the issue? Are you able to place a newline after the
@page line and then get things working or not? If you are then it seems like a regression and a keyword REGRESSION
should be added. To, it would seem that would be a P2 if that is the case as a workaround exists, but it really isn't
practical as one would have to first find this bug to know about the workaround...not obvious. If you can find no
workaround then it is a P1 as the feature does not exist. Please change the priority based on these two things. See:
http://wiki.netbeans.org/BugPriorityGuidelines

if you ever need to know how to set a priority.
Comment 16 nsegura3 2008-10-27 18:11:15 UTC
I verified this on NB 6.5 Beta, and it did work back then. So, somewhere between Beta and RC 1 it got broken.
I tried the workaround, and it makes no difference (actually I dont have a page in which to page statements are in the
same line). I am using JBoss 4.2.2.GA.
Since the workaround does not work, and the feature used to work in early builds of 6.5, I will upgrade this to a P1.
Comment 17 Petr Jiricka 2008-10-29 10:57:36 UTC
Sounds very annoying. Martine E, can I please ask you to look at this to see what could have caused this regression? I
don't think there was any change in the JSP debugging code. Thanks.
Comment 18 Martin Entlicher 2008-10-29 11:18:44 UTC
I've reproduced this on the provided example. Tooltip and Watches show null values. Local Variables work fine and show
correct values. I'm going to explore what's wrong...
Comment 19 Martin Entlicher 2008-10-29 11:53:40 UTC
This seems to be caused by using JavaSourceUtil.Handle to obtain the CompilationController - issue #147032.
That handle can work only upon FileObjects. But the sources of JSP are compiled into paths like
"<User-dir>/var/virtual1225276762192" and we can not obtain any FileObjects for paths like this. Therefore we can not
proceed with the parsing of tooltip and watches expressions.
Comment 20 Martin Entlicher 2008-10-29 15:29:40 UTC
I've fixed it in trunk in changeset:   106890:b61763d018b9
http://hg.netbeans.org/main/rev/b61763d018b9

Can someone from QE please verify the fix? I'd like to integrate it into release65, IMHO it's a showstopper for JSP
debugger.
Comment 21 Daniel Prusa 2008-10-29 17:23:27 UTC
*** Issue 151329 has been marked as a duplicate of this issue. ***
Comment 22 Martin Schovanek 2008-10-29 18:50:10 UTC
Verified in trunk build by QE.
Comment 23 Quality Engineering 2008-10-30 04:57:33 UTC
Integrated into 'main-golden', will be available in build *200810300201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/b61763d018b9
User: mentlicher@netbeans.org
Log: #76385 - Fix of regression caused by the fix of issue #147032. The parsing of expressions must work even when we can not access the source file.
Comment 24 Daniel Prusa 2008-10-30 14:32:10 UTC
Review of the fix done. I think it is correct.
Comment 25 nsegura3 2008-10-30 17:56:05 UTC
I checked the latest build (200810300201), and the fix does work. I can see the tool tips with the actual variable
values when debugging JSP. Watches work too. Thanks!
Comment 26 Martin Entlicher 2008-10-31 16:51:21 UTC
Thanks for the review and verification, the fix is transplanted into release65 repository:
changeset:   105994:7c4a51894ecd
http://hg.netbeans.org/release65/rev/7c4a51894ecd