Correct syntax to pass get request parameter value by using EL
I'm trying to pass value by using EL expression in get request parameter, 开发者_如何学Pythonbut I'm getting empty value of request parameter whenever I click on that URL. Could anyone please tell me the correct syntax?
<c:forEach var="message" items="${requestScope.inboxmessage}" varStatus="messageCount" >
<a href="just.do?value="+${messageCount.count} >
</c:forEach>
When you use EL, you don't need to worry about concatenating Strings like that.
Try this: <a href="just.do?value=${messageCount.count}">
You might also want to look at the <c:out>
tag, it'll take care of things like escaping illegal characters.
精彩评论