Announcement Announcement Module
No announcement yet.
${} tags not evaluated in JstlView Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • ${} tags not evaluated in JstlView

    Spring 2.0.x, JDK6

    I have a JstlView served up by a Spring command controller.
    The JSP is rendered with the ${} tags unevaluated as follows:

    Count = ${count}

    The JSP src is as follows:

    <?xml version="1.0" encoding="ISO-8859-1" ?>
    <%@ taglib uri="" prefix="c" %>
    <%@ page contentType="text/html; charset=iso-8859-1" language="java" errorPage="" %>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    <html xmlns="">
      Count = ${count}
    I am not sure how to debug this - is there a way to trace the
    macro replacemenets in a JSP after the controller completes



  • #2
    That's not a problem with Spring but with your JSP engine, and specifically the JSP compiler/parser.
    The code generation step where it generates Java source code from your JSP doesn't recognise your JSTL 2.x syntax, assumes JSTL 1.x, and therefore doesn't generate code for the EL you used.

    Make sure you have your application set up as a Servlet 2.4 or later application in your web.xml and have the correct versions of your JSTL jars in your server (or application) classpath.


    • #3
      Try using the c tag.

      HTML Code:
      Count = <c:out value="${count}" />