Switch to full style
Java2 codes,problems ,discussions and solutions are here
Post a reply

Can't insert dynamic link in jstl

Wed Oct 22, 2008 1:13 am

I hope there's some jstl exprts here. I'm trying to insert a
dynamic link in an sql output table. Here's my test code:

Code:
<tr>
<!-- add the table column headings -->
<c:forEach var="columnName" items="${name.columnNames}">
<c:choose>
<c:when test="${columnName == 'uname'}">
<td><a link=edit.jsp>test got</a></td>
</c:when>
<c:otherwise>
<td> <c:out value="${columnName}"/> </td>
</c:otherwise>
</c:choose>

</c:forEach>
</tr>


Everything works fine except the link tag and I'm clueless why it doesn't.
Any ideas?



Re: Can't insert dynamic link in jstl

Wed Oct 22, 2008 1:15 am

This is an HTML problem, not JSTL.

The syntax of the <a> tag is wrong. It should be:
Code:
<a href="edit.jsp">

NOT
Code:
<a link=edit.jsp>


I always put quotes around all strings in HTML, JSTL, JSP, etc.

Post a reply
  Related Posts  to : Can't insert dynamic link in jstl
 Dynamic Domain Name System (Dynamic DNS )     -  
 JSTL URI problem     -  
 insert query example     -  
 DML Statements, insert row, delete row     -  
 Insert using native query     -  
 insert a namespace in a tag with jaxb     -  
 Asp.net insert update delete Examples     -  
 Image Insert in Excel File Using POI     -  
 insert information in html file with java     -  
 How do you 301 redirect a dynamic URL?     -