I have code like follows in a .jsp page:
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js">
var TextFields = new Array();
$(document).ready(function() {
<c:if test="${fn:length(textProperties) > 0}">
<c:forEach var="i" begin="0" end="${fn:length(textProperties) - 1}" step="1">
TextFields[${i}] = "${textProperties[i]}";
</c:forEach>
</c:if>
I am receiving red all over my JSTL code, because it is trying to interpret it as javascript. Is there a way of getting the editor to recognise both the javascript and JSTL seperately, such as a configuration in my project or a plugin?
Add this to the top of your JSP page
If you’re still having issues, did you create your eclipse project as a “Web Project”? It should work with your default Eclipse settings.