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 141287 - Cannot resolve implicit variables in a JSP file
Summary: Cannot resolve implicit variables in a JSP file
Status: VERIFIED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: JSP (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Tomasz Slota
URL:
Keywords:
: 146342 (view as bug list)
Depends on:
Blocks: 145813
  Show dependency tree
 
Reported: 2008-07-23 09:38 UTC by Satyaranjan D
Modified: 2008-09-17 12:31 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
TagLibApp.zip (746.45 KB, application/x-compressed)
2008-07-23 09:41 UTC, Satyaranjan D
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Satyaranjan D 2008-07-23 09:38:56 UTC
The IDE is not able to resolve the implicit variables defined by the custom taglib in a jsp page. The jar containing tld
and taglib implementation is already there in the web application's classpath. I can see the code completion for the jsp
tags but the IDE shows the error for the implicit variables defined in the TagExtraInfo class of those tags.

Please refer to the attached sample application.
Steps to reproduce:
- Open the attached NetBeans project
- Open WEB-INF/jsp/HelloWorld_view.jsp
- You can find "renderResponse" variable is shown as unresolved even though this variable is defined in the
DefineObjectsTagExtraInfo taglib class.
- But the other taglib code completion help for all <portlet:* tags are coming fine.

Let me know if you need any other info.
Comment 1 Satyaranjan D 2008-07-23 09:41:00 UTC
Created attachment 65332 [details]
TagLibApp.zip
Comment 2 Marek Fukala 2008-07-25 17:50:35 UTC
reproducible. Likely JSP parser doesn't provide such information or virtual java source just doesn't reflect it.
Reassigning to Tomasz for evaluation.
Comment 3 Satyaranjan D 2008-08-29 08:04:38 UTC
Are we going to fix it for NB 6.5 ?
Comment 4 Satyaranjan D 2008-08-29 08:10:02 UTC
It's a usability issue. Many users post messages about this issue. It has been there since NB 6.1 . So changing the
priority to P2.
Comment 5 Tomasz Slota 2008-09-01 14:59:28 UTC
I filed issue 145813 about the missing data from JspParser.

Here is a draft of the solution that will be implemented in the SimplifiedJSPServlet class:

JspSyntaxSupport syntaxSupport = JspSyntaxSupport.get(doc);
        Collection<String> prefixes = JspUtils.getJSPColoringData(doc, fobj).getPrefixMapper().keySet();

        for (String prefix : prefixes) {
            List<TagInfo> tags = syntaxSupport.getAllTags(prefix);

            for (TagInfo tag : tags) {
                for (TagVariableInfo var : tag.getTagVariableInfos()) {
                    // Create Variable Definitions
                }
            }
        }
Comment 6 Tomasz Slota 2008-09-09 15:24:46 UTC
*** Issue 146342 has been marked as a duplicate of this issue. ***
Comment 7 Tomasz Slota 2008-09-09 15:29:13 UTC
Fixed.
http://hg.netbeans.org/main/rev/f8131e3a920b
Comment 8 Quality Engineering 2008-09-10 06:04:23 UTC
Integrated into 'main-golden', will be available in build *200809100201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/f8131e3a920b
User: Tomasz Slota <tslota@netbeans.org>
Log: #141287: Cannot resolve implicit variables in a JSP file
Comment 9 josin 2008-09-17 12:31:58 UTC
Verified.