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.
Summary: | Java objects declared in included JSP fragments are not visible | ||
---|---|---|---|
Product: | javaee | Reporter: | shannonbrown <shannonbrown> |
Component: | JSP | Assignee: | Tomasz Slota <tslota> |
Status: | VERIFIED FIXED | ||
Severity: | blocker | CC: | pjiricka |
Priority: | P2 | ||
Version: | 6.x | ||
Hardware: | PC | ||
OS: | Windows XP | ||
Issue Type: | DEFECT | Exception Reporter: | |
Bug Depends on: | |||
Bug Blocks: | 115852 |
Description
shannonbrown
2007-08-07 21:56:08 UTC
The generated virtual servlet file provided to java infrastructure likely doesn't take the inclusion into account. Confirmed. The scenario you described should be definitely handled properly but I don't think we can fix the opposite situation (where B is referring to objects defined in A) /is it legal at all?/. We should also define the behavior in case the included file contains compilation errors. Note that we had no support for showing compilation errors in JSP scriptlets prior to 6.0. Excuse me, There is some idea of how to fix it? In version 5.5, used much this feature, therefore, I believe that this is of extreme importance to the users of NetBeans. Tks, Fixed in trunk. Checking in SimplifiedJSPServlet.java; /cvs/web/jspsyntax/src/org/netbeans/modules/web/core/syntax/SimplifiedJSPServlet.java,v <-- SimplifiedJSPServlet.java new revision: 1.25; previous revision: 1.24 done *** Issue 121065 has been marked as a duplicate of this issue. *** Thank you for the hard work. However, I do not believe this issue is resolved. Using NetBeans 6.0 200711021200 Assume the following: /index.jsp ---> a root level file /res/all.jsp ---> the file to be included /somesubdirectory/myapp.jsp ----> a subdirectory jsp file Now, if index.jsp includes /res/all.jsp, the issue reported does appear to be resolved. <%@include file="/res/all.jsp" %> HOWEVER, if /somesubdirectory/myapp.jsp includes /res/all.jsp, THE ISSUE REMAINS. That is, the fix does not appear to apply when including the common file from a subdirectory. <%@include file="../res/all.jsp" %> I tested this again this morning, and the IDE does not 'see' the include file in the latter situation. The IDE reports numerous errors in the 'calling' file (ex. myapp.jsp) just as before when referencing any common elements in the intended include file (all.jsp). I didn't imagine org.openide.filesystems.FileObject would not handle '../' in relative paths.. I am now using java.io.File, the problem has been resolved. /cvs/web/jspsyntax/src/org/netbeans/modules/web/core/syntax/SimplifiedJSPServlet.java,v <-- SimplifiedJSPServlet.java new revision: 1.34; previous revision: 1.33 *** Issue 148606 has been marked as a duplicate of this issue. *** verified Product Version: NetBeans IDE Dev (Build 200811011401) Java: 1.6.0_10-rc2; Java HotSpot(TM) Client VM 11.0-b15 System: Linux version 2.6.24-21-generic running on i386; UTF-8; en_US (nb) |