Originally posted by Bear Bibeault:
As for your questions:
1. There is no string concatentation operator in the EL. What you want to do is easily possible using another mechanism if you are using JSP 2.0.
2. Why would you want to mix the JSTL and EL wth scriptlets? Use one or the other. Mushing both types of technology together on the same page just creates a mess.
Originally posted by Raj Ohadi:
I want to use JSTL (if I can avoid scriplet)
I know in a javascript it can access a JSP variable by using <%= var %> but I don't know if we can access a EL variable in javascript. that's why I want to "assign" a EL variable to a JSP variable first and then access the JSp var in javascript.
Originally posted by Stefan Evans:
There is no concatenation operator in JSTL.
But you can quite easily concatenate things:
<c:set var="msg" value="${msg}${name},}"/>
Originally posted by Stefan Evans:
<c:set var="msg"><c:out value="${msg}"/><c:out value="${name}"/>,</c:set>
Anything you put between the <c:set> tags becomes part of the concatenated string value.
Pay attention! Tiny ad!
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
|