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 121269 - @page include with absolute path is ignored in scriptles
Summary: @page include with absolute path is ignored in scriptles
Status: VERIFIED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: JSP (show other bugs)
Version: 6.x
Hardware: All All
: P1 blocker (vote)
Assignee: Tomasz Slota
URL:
Keywords: SIMPLEFIX
Depends on:
Blocks:
 
Reported: 2007-11-06 10:34 UTC by Tomasz Slota
Modified: 2008-04-17 10:47 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Diff (8.51 KB, text/plain)
2007-11-11 11:35 UTC, Tomasz Slota
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tomasz Slota 2007-11-06 10:34:28 UTC
@page include with absolute path is ignored in scriptlets (e.g. no code completion, objects defined in included file are not recognized). The workaround is to 
use a relative path.
Comment 1 Petr Pisl 2007-11-06 12:22:02 UTC
Tomasz try to look at the hyperlink implementation. There is a helper method which resolve DataObject(FileObject) to
open right file from @page include directive.
Comment 2 Tomasz Slota 2007-11-11 09:51:22 UTC
*** Issue 121520 has been marked as a duplicate of this issue. ***
Comment 3 Tomasz Slota 2007-11-11 11:31:07 UTC
The issue gives a bad user experience, but is easy to fix, I think it is worth to fix it for the 6.0 release.

The fix was to use a helper method written by ppisl to find a FileObject from a path in the JSP file. The method was moved from JSPHyperlinkProvider to the 
JspUtils class.

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.35; previous revision: 1.34
done
Checking in JspUtils.java;
/cvs/web/jspsyntax/src/org/netbeans/modules/web/core/syntax/JspUtils.java,v  <--  JspUtils.java
new revision: 1.13; previous revision: 1.12
done
Checking in JSPHyperlinkProvider.java;
/cvs/web/jspsyntax/src/org/netbeans/modules/web/core/syntax/JSPHyperlinkProvider.java,v  <--  JSPHyperlinkProvider.java
new revision: 1.23; previous revision: 1.22
done
Comment 4 Tomasz Slota 2007-11-11 11:35:27 UTC
Created attachment 52846 [details]
Diff
Comment 5 Tomasz Slota 2007-11-11 11:40:54 UTC
Testings tips:

Test if objects defined in included JSP fragment files are visible. Use different ways to specify paths - absolute and relative, including paths that contain '..'. 
Check if invalid paths are not causing any troubles.

The risk of regressions is low as the helper method that is now called has been used in the JSPHyperlinkProvider for a long time.
Comment 6 Petr Pisl 2007-11-12 11:18:02 UTC
This fix is OK. It is safe to put into release60 branch.
Comment 7 Martin Schovanek 2007-11-12 14:18:53 UTC
Verified in trunk by QE.
Comment 8 Tomasz Slota 2007-11-12 14:58:04 UTC
fixed integrated into the 'release60' branch.

IDE: [11/12/07 3:56 PM] Committing Files started
Checking in SimplifiedJSPServlet.java;
/cvs/web/jspsyntax/src/org/netbeans/modules/web/core/syntax/SimplifiedJSPServlet.java,v  <--  SimplifiedJSPServlet.java
new revision: 1.34.2.1; previous revision: 1.34
done
Checking in JspUtils.java;
/cvs/web/jspsyntax/src/org/netbeans/modules/web/core/syntax/JspUtils.java,v  <--  JspUtils.java
new revision: 1.12.2.1; previous revision: 1.12
done
Checking in JSPHyperlinkProvider.java;
/cvs/web/jspsyntax/src/org/netbeans/modules/web/core/syntax/JSPHyperlinkProvider.java,v  <--  JSPHyperlinkProvider.java
new revision: 1.22.2.1; previous revision: 1.22
done
IDE: [11/12/07 3:56 PM] Committing Files finished
Comment 9 Jindrich Sedek 2008-04-17 10:47:31 UTC
verified.
NetBeans IDE 6.1 RC2 (Build 200804170002)