Hi,

 

Can I use a variable inside the <c:choose> tag in a JSP page.  For example,
consider the following code snipet.

 

<% 

      String mapcolumn = request.getParameter ( "columnname" );

%>

 

          <select name="selectMapColumn">

            <c:forEach var="columnName" items="${stmt.columnNames}">

              <c:choose>

                <c:when test="${columnName == '<%= mapcolumn %>'}">


                  <option selected><c:out value="${columnName}"/></option>

                </c:when>

                <c:otherwise>

                  <option><c:out value="${columnName}"/></option>

                </c:otherwise>      

              </c:choose>

            </c:forEach>

          </select>

 

Thank you,

Amar Das

 

Perot Systems - Government Services

Voice: 781.545.2697

       207.594.3007

 

Reply via email to