MyEclipse Forums
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
sm99
Post subject: JSTL in JavaScript  PostPosted: Jul 16, 2012 - 10:19 PM



Joined: Jul 16, 2012
Posts: 3

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!
 
 View user's profile Send private message  
Reply with quote Back to top
support-swapna
Post subject:   PostPosted: Jul 17, 2012 - 07:57 AM



Joined: Nov 11, 2010
Posts: 2193

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.

_________________
Swapna
MyEclipse Support
 
 View user's profile Send private message  
Reply with quote Back to top
sm99
Post subject: JSTL in JavaScript  PostPosted: Jul 17, 2012 - 11:11 PM



Joined: Jul 16, 2012
Posts: 3

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.
 
 View user's profile Send private message  
Reply with quote Back to top
support-swapna
Post subject:   PostPosted: Jul 18, 2012 - 08:17 AM



Joined: Nov 11, 2010
Posts: 2193

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.

_________________
Swapna
MyEclipse Support
 
 View user's profile Send private message  
Reply with quote Back to top
sm99
Post subject: JSTL in Java Script  PostPosted: Feb 12, 2013 - 06:23 PM



Joined: Jul 16, 2012
Posts: 3

Hi,
I was just wondering if there are any available patches/fixes for this. Thanks!
 
 View user's profile Send private message  
Reply with quote Back to top
support-swapna
Post subject:   PostPosted: Feb 14, 2013 - 08:57 AM



Joined: Nov 11, 2010
Posts: 2193

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.

_________________
Swapna
MyEclipse Support
 
 View user's profile Send private message  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT - 6 Hours
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2004 The PNphpBB Group
Credits