Pages

Friday, June 25, 2010

<c:out = “” /> tag problem

While using the JSTL a very common problem faced is that

<c:out value="${now}"/> tags are not interpreted as they are supposed to be.

After going through the forums, I changed my xml version from 2.5 to 2.4 and all the tags started working correctly.

Earlier XML:

<?xml version="1.0" encoding="utf-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" version="2.5">

After Making the Changes:

<?xml version="1.0" encoding="utf-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_4.xsd"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_4.xsd" version="2.4">

 

References: http://forum.springsource.org/archive/index.php/t-21093.html

2 comments:

  1. thank you for a very useful post! just helped me solve a problem after wasting a day switching jars and commenting/uncommenting code

    ReplyDelete
  2. I'm facing the same problem, can you tell me what xml file is it?

    ReplyDelete