Forum Stats

  • 3,783,379 Users
  • 2,254,767 Discussions
  • 7,880,376 Comments

Discussions

strange behaviour in jsp display

user445093
user445093 Member Posts: 4
Hi all,
little prolem with jsp tanslation into html

I can't understand why I can't display anything without the c:out tag!!!!!

<c:forEach items="${CODICE_ISO}" var="codice">
<option>${codice}</option>
</c:forEach></select>

i see ${codice}!!!

<c:forEach items="${CODICE_ISO}" var="codice">
<option ><c:out value="${codice}"/></option>
</c:forEach></select>

i see the values of codice...

thnak you very much

Answers

  • gimbal2
    gimbal2 Member Posts: 11,949 Gold Trophy
    Usually this is related to the servlet specification version that you declare in your web.xml file. Post the web.xml file; if it is large, post only the <webapp> header element.
  • tnx, that was the problem: old dtd and new xsd

    old web.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
    <web-app>

    the new one:
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" version="2.4">
  • gimbal2
    gimbal2 Member Posts: 11,949 Gold Trophy
    you can probably even crank it up to 2.5 though. Even 2.4 is ancient.
This discussion has been closed.