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 246249 - Netbeans 8.0 'cannot find symbol' error on variable from another <%@ include file
Summary: Netbeans 8.0 'cannot find symbol' error on variable from another <%@ include ...
Status: VERIFIED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: JSP (show other bugs)
Version: 8.1
Hardware: All All
: P2 normal (vote)
Assignee: Martin Fousek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-08-04 13:55 UTC by ramontemp
Modified: 2014-08-08 10:46 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ramontemp 2014-08-04 13:55:36 UTC
I have a main jsp page that includes 2 jspf files.
In the first one I declare a variable which I use on the second one and on the main file.

fileA.jspf:
<%
String myString = "Hello there";
%>

fileB.jspf:
<%
out.print(myString);
%>

main.jsp:
<%@ include file="WEB-INF/jspf/fileA.jspf" %>
<%@ include file="WEB-INF/jspf/fileB.jspf" %>
<%
out.print(myString);
%>

Everything compiles without errors and the page works fine on the browser.

Netbeans gives me an error on the "myString" variable in the fileB.jspf file, but not on the main.jsp file.

The error is:
cannot find symbol
 symbol: variable myString
 location: class SimplifiedJSPServlet
Comment 1 Martin Fousek 2014-08-05 06:50:01 UTC
That might be consequence of the bug #122214 fix. I'm going to take a look before next release/patch.
Comment 2 Martin Fousek 2014-08-05 07:39:51 UTC
I check the functionality inside NB80 where this worked so this can be considered as a regression -> changing priority to P2. We can try to get this into the NB801 patch. Vlado please could you take a look on that once it's possible, thanks a lot!

Fixed in web-main #e85c8a87f805.
Comment 3 Martin Fousek 2014-08-05 09:04:14 UTC
Also preventing NPE in web-main #5ba16f611902.

Petre, could you take a look at that. It should be safe now:
web-main #e85c8a87f805 and web-main #5ba16f611902
Comment 4 Petr Hejl 2014-08-05 11:22:12 UTC
Seems to be safe.
Comment 5 Vladimir Riha 2014-08-05 11:37:20 UTC
Verified, main.jsp no longer shows error


Product Version: NetBeans IDE Dev (Build web-main-1133-on-20140805)
Java: 1.8.0_11; Java HotSpot(TM) Client VM 25.11-b03
Runtime: Java(TM) SE Runtime Environment 1.8.0_11-b12
System: Linux version 3.13.0-32-generic running on i386; UTF-8; en_US (nb)
Comment 6 Martin Fousek 2014-08-05 12:01:38 UTC
Transplanted into release801 branch:
e85c8a87f805 transplanted to 9c1d99dd6a04
5ba16f611902 transplanted to af20d4cab353
Comment 7 Quality Engineering 2014-08-06 02:38:55 UTC
Integrated into 'main-silver', will be available in build *201408060001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/e85c8a87f805
User: Martin Fousek <marfous@netbeans.org>
Log: #246249 - Netbeans 8.0 'cannot find symbol' error on variable from another <%@ include file
Comment 8 ramontemp 2014-08-07 07:41:27 UTC
Is there a tutorial somewhere how to install the nightly updates. I downloaded the  201408060001 build, but I cannot install it on my existing Netbeans IDE.

So I added the "Latest Development Build" url to the Plugin settings and it has updated my Netbeans to the 20140805 build, but its not updating further. I need the 20140806 for this patch.

This is my current IDE version:
Product Version: NetBeans IDE Dev (Build nbms-and-javadoc-1981-on-20140805)
Updates: NetBeans IDE is updated to version NetBeans 8.0 Patch 2

Thanks
Comment 9 Vladimir Riha 2014-08-07 07:53:10 UTC
You can download it from [1], you should be able to install it next to the 8.0 version or you can download "OS Independent ZIP" from [1] by selecting the Platform combo box. Then just extract the zip archive and run it.


[1] bits.netbeans.org/download/trunk/nightly/latest/
Comment 10 ramontemp 2014-08-07 11:57:11 UTC
ok, I have downloaded the latest version of the nightly update and installed a new Netbeans IDE.

Now I have:
Product Version: NetBeans IDE Dev (Build 201408070001)

But I still have the same problem.

Netbeans recognises the myString variable in the main.jsp page, but gives the following warning in the fileB.jspf, by highlighting the myString variable in red:

cannot find symbol
 symbol: variable myString
 location: class SimplifiedJSPServlet
Comment 11 Quality Engineering 2014-08-07 14:47:41 UTC
Integrated into 'releases/release801', will be available in build *201408071314* or newer. Wait for official and publicly available build.

Changeset: http://hg.netbeans.org/releases/rev/9c1d99dd6a04
User: Martin Fousek <marfous@netbeans.org>
Log: #246249 - Netbeans 8.0 'cannot find symbol' error on variable from another <%@ include file
(transplanted from e85c8a87f8057e519cd0764a09d56429501668ef)
Comment 12 Martin Fousek 2014-08-08 04:41:17 UTC
(In reply to ramontemp from comment #10)
> Netbeans recognises the myString variable in the main.jsp page, but gives
> the following warning in the fileB.jspf, by highlighting the myString
> variable in red:
> 
> cannot find symbol
>  symbol: variable myString
>  location: class SimplifiedJSPServlet

Sorry, I overlooked second part of your issue. But I'm afraid that it's something we've never supported before. I entered enhancement for your second issue. The first part (error in main.jsp) was regression of the NB801, second one I entered as enhancement #246337.
Comment 13 Vladimir Riha 2014-08-08 10:46:52 UTC
Verified in 8.0.1

Product Version: NetBeans IDE 8.0.1 RC1 (Build 201408072300)
Java: 1.8.0_11; Java HotSpot(TM) Client VM 25.11-b03
Runtime: Java(TM) SE Runtime Environment 1.8.0_11-b12
System: Linux version 3.13.0-32-generic running on i386; UTF-8; en_US (nb)