facebook

JSTL in JavaScript

  1. MyEclipse Archived
  2.  > 
  3. Bugs
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #328252 Reply

    sm99
    Member

    Hi,

    I am using MyEclipse 10.5 and it seems that I am getting a validation error when there is a JSTL tag within my JavaScript. Is there a way to fix this in the configuration – A sample jsp file is presented below:

    <%@ page language=”java” pageEncoding=”UTF-8″%>

    <%@ taglib uri=”/WEB-INF/tld/c.tld” prefix=”c” %>
    ….
    <!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN”>
    <html>
    <head>

    —-

    <script language=”javascript”>

    var requests = new Array(<c:out value=”${command.requestCount}” />);

    <c:if test=”${command.requestCount > 0}”>

    I get an error at right here at <c:if> line — “syntax error on tokens: delete these tokens”

    Any help is appreciated. Thank you!

    #328264 Reply

    support-swapna
    Moderator

    sm99,

    Sorry that you are seeing this issue. We have a PR filed for this one and the dev team is looking into it.
    Alternatively you can use the logical operator ‘gt’ instead of ‘>’ and see if it works for you.

    #328280 Reply

    sm99
    Member

    Thank you for your reply. The gt seems to work but there are other <c:if> instances I think where the validator seems to think of it as an error. I am attaching a txt file(JSP) that seems to have a problem too. Lastly, in JS files, how can we use JSTL tags without
    the validator seeing it as an error. Is there a configuration for this? Thanks.

    Attachments:
    You must be logged in to view attached files.
    #328293 Reply

    support-swapna
    Moderator

    sm99,

    Thank you for reporting it.The dev team is investigating the issue. I am afraid there is no configuration to omit the JSTL tags from validation.

    You can right click on the jsp > MyEclipse > Exclude from Validation . This will not show the errors in the Problem view but the editor will still mark it as error.

    Sorry for inconvenience caused.

    #335324 Reply

    sm99
    Member

    Hi,
    I was just wondering if there are any available patches/fixes for this. Thanks!

    #335409 Reply

    support-swapna
    Moderator

    sm99,

    Can you please update to MyEclipse 10.7.1 our latest version which released last week and check if you still see the issue ?

    Let us know how it works for you.

Viewing 6 posts - 1 through 6 (of 6 total)
Reply To: JSTL in JavaScript

You must be logged in to post in the forum log in