Jadeler wrote:
Im having problems trying to build my url using
html:link and jstl. Im iterating over a list using
jstl and I want to pass in the id to the url.
Currently, im doing this:
<c:forEach var="webProduct" items="${webProductList}"
varStatus="loopStatus">
<html:link action='<%= "/StartBuyPolicy?x=" +
Constants.TU_PROD_TRS + "&y=" +
Constants.TU_PLAN_VIS%>'>Buy product</html:link>
</c:forEach>
I want to do something like this:
<c:forEach var="webProduct" items="${webProductList}"
varStatus="loopStatus">
<html:link action='<%= "/StartBuyPolicy?x=" +
${webProduct.id} + "&y=" + ${webProduct.name} %>'>Buy
product</html:link>
</c:forEach>
you've got your JSTL expressions nested inside a scriptlet there; you
can't mix the two like that. Try this instead:
<html:link action=
"/StartBuyPolicy?x=${webProduct.id}&y=${webProduct.name}"
>Buy product</html:link>
Note: I'm not sure if you need the & escape, it might work with just
'&' but it's technically more correct to use the escape.
L.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]