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 229642 - Errors parsing JSP files
Summary: Errors parsing JSP files
Status: RESOLVED DUPLICATE of bug 226207
Alias: None
Product: javascript
Classification: Unclassified
Component: Editor (show other bugs)
Version: 7.3
Hardware: Sun All
: P3 normal (vote)
Assignee: Petr Pisl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-05-13 09:36 UTC by axw001
Modified: 2013-05-13 10:19 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
IDE log (164.07 KB, text/plain)
2013-05-13 09:36 UTC, axw001
Details

Note You need to log in before you can comment on or make changes to this bug.
Description axw001 2013-05-13 09:36:01 UTC
Product Version = NetBeans IDE 7.3 (Build 201302132200)
Operating System = SunOS version 5.10 running on x86
Java; VM; Vendor = 1.6.0_31
Runtime = Java HotSpot(TM) Client VM 20.6-b01

After migrating from 7.2 to 7.3 my tree of jsp files in my project lit up like a christmas tree with message "JavaServer Page File Error parsing file".

I think the problem may be related to parsing of tags in a javascript context.

In the following extract from a jsp page the parsing error occurs unless I put javascript comments before the logic tags. Wrapping the tags in jsp comments <%-- -- %> also clears the error but obviously makes the tag not function.

  <script type="text/javascript">
      
    document.login.j_username.focus();
     
    //<logic:present parameter="loginError">
    msg = "Sorry - we could not find a match for the user name and password you provided.\n" 
        + "N.B. both user name and password are case sensitive.";
    
    alert(msg);
    //</logic:present>
        
    
    function ie8Alerter() {
        
       var Y = YUI();
        // leverage boolean coercion -- 0 evaluates as false
       if (Y.UA.ie && Y.UA.ie < 9 ) {  // IE
           document.login.btnLogin.disabled = true;
           alert("We are very sorry...\n\nIE8 does not have sufficient capabilities to work with Liberty Accounts\nPlease updgrade to a current version of IE\nor use Firefox or Chrome if you are on Windows XP.");
       }  
       
    } 
    
    ie8Alerter();
        
  </script>


The problem is similar for tags in javascript in the event handlers so:

<input type="text" class="inputText26" onfocus="this.select();" name="j_username" maxlength="25">  is OK

but

<input type="text" class="inputText26" onfocus="this.select(<bean:write name="cobrandBean" scope="session" property="partnerID" filter="false"/>);" name="j_username" maxlength="25">

triggers a parsing error.

The tags only produce the error when they are parsed in a javascript context. When they are in the html context there is no parsing error.
Comment 1 axw001 2013-05-13 09:36:07 UTC
Created attachment 134350 [details]
IDE log
Comment 2 Vladimir Riha 2013-05-13 10:19:18 UTC
It really looks like problem with tags inside javascript code. Thanks for reporting

*** This bug has been marked as a duplicate of bug 226207 ***