Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Spring with JSTL the expresion c:out value="${result}" not working

 
Paco Martin Duque
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everyone,

I have just finished a little test about SPRING with JSTL.
I got a suprise when the expresion :

<c ut value="${result}"/>

returns

${result}

but it's worse because the following expresion:

<c ut value="1+2+3"/>
<br>
<c ut value="${1+2+3}"/>

return

1+2+3
${1+2+3}

I show you what I have:

1) JSP include:

<%@ page session="false"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt" %>

(*) the tags lib

2) JSP

<%@ include file="/WEB-INF/jsp/include.jsp" %>

<html>
<head>
<title>Test</title>
</head>
<body>

<h2>Test #1!</h2>
<p>
<c ut value="${result}"/>
<br>
<c ut value="1+2+3"/>
<br>
<c ut value="${1+2+3}"/>
</p>
</body>
</html>


3) The spring controller:

public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {


...
return new ModelAndView("TransactionTest.jsp", "result" , "Hello");
}

4) My web.xml

...
<taglib>
<taglib-uri>http://java.sun.com/jstl/core</taglib-uri>
<taglib-location>/WEB-INF/tlds/c.tld</taglib-location>
</taglib>

</web-app>



6) Configuration:
- spring-framework-2.5.6
- Jboss 4.2.3


Any idea of what it's happening? Have I forgotten anything?


Thanks in advance.
[ December 05, 2008: Message edited by: Paco Martin Duque ]
 
Paco Martin Duque
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everyone...

Surfing I get the following post in other forum where the solution is:

http://www.velocityreviews.com/forums/t133907-jstl-and-cout-value-not-being-evaluated.html

The solution is:
<%@ page isELIgnored="false"%>

See you soon!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic