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 257571 - Netbeans 8.1 'cannot find symbol' error on variable from "grand parent" file of multi-level @include directive
Summary: Netbeans 8.1 'cannot find symbol' error on variable from "grand parent" file ...
Status: NEW
Alias: None
Product: javaee
Classification: Unclassified
Component: JSP (show other bugs)
Version: 8.1
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: issues@javaee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-01-14 18:00 UTC by OliverLo81
Modified: 2016-01-14 18:00 UTC (History)
0 users

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 OliverLo81 2016-01-14 18:00:51 UTC
I am experiencing a similar problem reported in 246249 where it is giving "cannot find symbol" on variables from a file that was included in the included file of the current page.
eg.
top.jsp:
<%
  String myStr = "Hello";
%>

header.jsp:
<%@include file="top.jsp"%>
<% 
  String myStr2 = myStr + " there";
  String myStr3 = "How can I help you?";
%>

main.jsp
<%@include file="header.jsp"%>
<%
  out.print(myStr);
  out.println(myStr2);
  out.println(myStr3);
%>

No errors from header.jsp
From main.jsp, it marked the following lines with errors:
1. <%@include file="header.jsp"%>
2.  out.print(myStr);

Error is:
cannot find symbol
  symbol:   variable myStr
  location: class SimplifiedJSPServlet

Previously I was working with Netbeans 6.5.1 and it worked fine there, at least it didn't show any errors for the out.print(myStr) line.
Note: the file compiles and runs fine, just showing error on the editor.

Here are my NB enviroment:
Product Version: NetBeans IDE 8.1 (Build 201510222201)
Java: 1.7.0_79; Java HotSpot(TM) 64-Bit Server VM 24.79-b02
Runtime: Java(TM) SE Runtime Environment 1.7.0_79-b15
System: Windows 7 version 6.1 running on amd64; Cp1252; en_CA (nb)