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 223895 - Struts templates reporting as error
Summary: Struts templates reporting as error
Status: RESOLVED WONTFIX
Alias: None
Product: javaee
Classification: Unclassified
Component: JSP (show other bugs)
Version: 7.3
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Marek Fukala
URL:
Keywords:
Depends on: 224024
Blocks:
  Show dependency tree
 
Reported: 2012-12-16 15:44 UTC by tonyattwood
Modified: 2016-07-07 08:53 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
IDE log (60.81 KB, text/plain)
2012-12-16 15:44 UTC, tonyattwood
Details
An affected template (2.85 KB, application/octet-stream)
2012-12-17 19:26 UTC, tonyattwood
Details
Screen dump of error (19.04 KB, image/png)
2012-12-18 10:46 UTC, tonyattwood
Details
prototype (4.79 KB, patch)
2012-12-19 11:33 UTC, Martin Fousek
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description tonyattwood 2012-12-16 15:44:25 UTC
Product Version = NetBeans IDE 7.3 Beta 2 (Build 201211062253)
Operating System = Windows 7 version 6.1 running on x86
Java; VM; Vendor = 1.7.0_02
Runtime = Java HotSpot(TM) Client VM 22.0-b10

Struts some, but not all templates are being reported as having an error - 'Error Parsing File' however the pages seem to work fine.  There is no indication of the error when editing the page.
Comment 1 tonyattwood 2012-12-16 15:44:29 UTC
Created attachment 129423 [details]
IDE log
Comment 2 Jiri Skrivanek 2012-12-17 08:35:52 UTC
Please, describe how did you create files and what errors did you see.
Comment 3 tonyattwood 2012-12-17 19:26:53 UTC
Created attachment 129474 [details]
An affected template

Red icon on the project browser shows error 'Error Parsing File' when hovered over.
Comment 4 tonyattwood 2012-12-17 19:28:59 UTC
The file was created with an earlier version (probably 7.2).  There is no errors shown in the jsp editor only on the project browser.
Comment 5 tonyattwood 2012-12-18 10:46:40 UTC
Created attachment 129495 [details]
Screen dump of error
Comment 6 Martin Fousek 2012-12-19 11:33:13 UTC
Created attachment 129537 [details]
prototype

I started with writing prototype for fixing this, but the last TokenHierarchy creation is inside the JsEmbeddingProvider and its JspTranslator which is not pluggable from another modules and so it can't create proper TH. I'm attaching the prototype for another places, but anyway it would not work w/out the JsEmbeddingProvider rewrite to standard API/SPI.
Comment 7 Martin Fousek 2012-12-19 11:34:31 UTC
I'm reassigning the issue to the JSP since the issue is in badly lexed JSP source then. This cannot be done in NB7.3 for sure due to risky rewrite of the JsEmbeddingProvider now.
Comment 8 tonyattwood 2013-02-25 21:03:58 UTC
I have an entry in a tiles template which when removed the error disappears the line is:

<script type="text/javascript" src="js/<tiles:getAsString name="jsfile2" ignore="true"/>"></script>

Changing ignore="false" has no effect.
Comment 9 VR_RAF 2013-03-13 15:10:12 UTC
When using 7.3 version it has problems with parsing JSP files.
As far i can see it has problems when parsing tags between quotes.
For example:
<input type="button" value='<bean-el:message key="button.deactivate"/>' onclick='if(confirm("<bean:message key="confirm.question"/>?")){this.form.submit();}'/>

value attribute of the input element is parsed ok without errors, however the onclick is not due to the fact that there are double quotes between other double quotes.
My page is displayed as it should and the bean-el:message tag is processed as it should. 
In netbeans 7.2 it didnt report errors about this style of writing, this should be fixed.
It is not only Struts template problem it is how Netbeans editor parses the JSP page with other taglibs.
(In reply to comment #8)
> I have an entry in a tiles template which when removed the error disappears the
> line is:
> 
> <script type="text/javascript" src="js/<tiles:getAsString name="jsfile2"
> ignore="true"/>"></script>
> 
> Changing ignore="false" has no effect.
Comment 10 Marek Fukala 2014-07-29 09:41:14 UTC
(In reply to Martin Fousek from comment #7)
> I'm reassigning the issue to the JSP since the issue is in badly lexed JSP
> source then. This cannot be done in NB7.3 for sure due to risky rewrite of
> the JsEmbeddingProvider now.

I'm sorry but I do not understand what is badly lexed. Do you mean the src attribute value in 

<script type="text/javascript" src="js/<tiles:getAsString name="jsfile2" ignore="true"/>"></script>

???

If the "tiles" is properly matched to properly parsed tag library, then it works like a charm! Can you please elaborate?
Comment 11 Martin Balin 2016-07-07 08:53:26 UTC
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue.

Thanks for your cooperation,
NetBeans IDE 8.2 Release Boss