0

In one of my jspx, the jstl expression below:

<c:set var="colors" value="${['#1abc9c', '#e74c3c', '#3498db', '#F4D03F', '#9b59b6', '#bdc3c7', '#244F75']}" />

is throwing the below error on tomcat 7:

org.apache.jasper.JasperException: /WEB-INF/views/proj/abc/show.jspx (line: 90, column: 119) "${['#1abc9c', '#e74c3c', '#3498db', '#F4D03F', '#9b59b6', '#bdc3c7', '#244F75']}" contains invalid expression(s): javax.el.ELException: Failed to parse the expression [${['#1abc9c', '#e74c3c', '#3498db', '#F4D03F', '#9b59b6', '#bdc3c7', '#244F75']}]

I have added the following in my tomcat 7 conf catalina.properties as per other threads but it doesn't help.

org.apache.el.parser.SKIP_IDENTIFIER_CHECK=true

Well it is working for my colleagues on tomcat 8.5. Do I really need to upgrade or am I missing something?

user2918640
  • 473
  • 1
  • 7
  • 25
  • Try adding JSTL library is included within `$CATALINA_HOME/lib` or within your `WEB-INF/lib` directory. tell me result. https://mvnrepository.com/artifact/javax.servlet.jsp.jstl/jstl/1.2 – Vy Do Aug 21 '17 at 09:32
  • 1
    So why aren't you using the same version of Tomcat as your colleagues? – user207421 Aug 24 '17 at 02:29
  • @EJP I eventually did but I was still curious to know what tomcat 7 does not have. – user2918640 Aug 24 '17 at 16:30

1 Answers1

0

Try changing to:

<c:set var="colors" value="${fn:split('#1abc9c,#e74c3c,#3498db,#F4D03F,#9b59b6,#bdc3c7,#244F75', ',')}" />
Kohei TAMURA
  • 4,970
  • 7
  • 25
  • 49