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 157782

Summary: included variables are marked as errors in JSP page
Product: javaee Reporter: Jindrich Sedek <jsedek>
Component: JSPAssignee: Tomasz Slota <tslota>
Status: VERIFIED FIXED    
Severity: blocker CC: bakarirum, mfukala
Priority: P2 Keywords: REGRESSION
Version: 6.x   
Hardware: Sun   
OS: All   
Issue Type: DEFECT Exception Reporter:

Description Jindrich Sedek 2009-02-02 14:31:10 UTC
create one page called header.jsp - use this code inside:
---------------------
<jsp:useBean id="bz" scope="session" class="java.util.ArrayList"/>
<%!
      String hallo = "hallo JOHN";
%>
---------------------
create second jsp page. Use this code inside:
---------------------
<%@include file="header.jsp"%>
<% out.print(hallo); %>
<%
  bz.add("simple");
%>
---------------------
header file should be included in translation time so the variable and bean should be visible according to the JSP 
specification:
-----------------
JSP.1.10.3        The include Directive
     The include directive is used to substitute text and/or code at JSP page transla-
tion-time. The <%@ include file=”relativeURLspec” %> directive inserts the text of
the specified resource into the page or tag file.
-----------------

bean "bz" works well - it's in code completion and it's not marked as an error, BUT

variable "hallo" is marked as an error in second file and it's not in code completion
Comment 1 Marek Fukala 2009-03-13 15:41:59 UTC
Looks like SimplifiedServlet bug in the files inclusion.
Comment 2 Jindrich Sedek 2009-05-13 11:40:52 UTC
tomas, is it possible to fix this issue in 6.7, it's quite confusing having these errors in the editor
Comment 3 Tomasz Slota 2009-05-13 13:40:03 UTC
This is a regression introduced with migration to CSL - the code handling JSP includes is commented out... Probably a P2
Comment 4 Tomasz Slota 2009-05-18 15:18:45 UTC
*** Issue 153662 has been marked as a duplicate of this issue. ***
Comment 5 Tomasz Slota 2009-05-20 18:04:29 UTC
first part of the fix:
http://hg.netbeans.org/web-main/rev/c88e04869d74

(there is still a problem with beans declared in the included files, it should be fixed soon)
Comment 6 Quality Engineering 2009-05-21 08:26:11 UTC
Integrated into 'main-golden', will be available in build *200905210201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/c88e04869d74
User: Tomasz Slota <tslota@netbeans.org>
Log: #157782: included variables are marked as errors in JSP page
Comment 7 Tomasz Slota 2009-05-21 12:18:29 UTC
It should be fixed now:

http://hg.netbeans.org/web-main/rev/d5193ff17a3e
Comment 8 Quality Engineering 2009-05-22 07:26:33 UTC
Integrated into 'main-golden', will be available in build *200905220201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/d5193ff17a3e
User: Tomasz Slota <tslota@netbeans.org>
Log: #157782: included variables are marked as errors in JSP page
Comment 9 Jindrich Sedek 2009-05-22 07:59:07 UTC
verified
NetBeans IDE Dev (Build web-main-673-on-090522)
Comment 10 Tomasz Slota 2009-11-12 10:14:02 UTC
*** Bug 164599 has been marked as a duplicate of this bug. ***