开发者

Correct syntax to pass get request parameter value by using EL

开发者 https://www.devze.com 2022-12-26 03:24 出处:网络
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 m

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消