tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Wagner <ps...@hotmail.com>
Subject Re: How to use index in EL expression?
Date Thu, 25 Sep 2014 10:00:28 GMT
Hello,


use a temporary variable as an “index”:





<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>

<html>

    <head>

      <title>EL Test</title>

    </head>


    <body>

      <c:forEach var="i" begin="1" end="10">

        <c:set var="paramName" value="vorname${i}"/>

        ${param[paramName]}<br/>

     </c:forEach>

    </body>

</html>




Regards, Peter
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message