• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Tim Cooke
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Frank Carver
  • Henry Wong
  • Ron McLeod
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Himai Minh

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

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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!
 
Please do not shoot the fish in this barrel. But you can shoot at this tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic