JSTL concatenate

J

jf

Well.. i wanna to concatenate a string... like:

String x;

while(true)
x += "x";


Then i get xxxxxxxxxxxxxxxxxxxx :)

How do i do that on JSTL?

Here is my code...

<c:set var="valorColuna" value="${rowValues.value}"/>

<c:forEach var="pk" items="${datagrid.primaryKeys}">
<c:set var="pkActual" value="${pk.columnName}"/>
<c:if test="${colunaActual == pkActual}">
<c:set var="pkValor" value="${valorColuna}{$valorColuna}"/>

I have tried without operators but it does not work. JSTL functions
also seem not to help (no concat function!)...

Any sugestions?

Thanks,

JF
 
W

Wendy Smoak

<c:set var="pkValor" value="${valorColuna}{$valorColuna}"/>

{$valorCaluna} should be ${valorCaluna} (you have the $ and { switched in
the second one.)

If that's not the problem, try changing == to eq instead. I don't know if
they have different functions in JSTL, but in 'regular' Java == and equals
are certainly different.

If you're still stuck, post a complete example-- yours is missing end tags.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,007
Latest member
OrderFitnessKetoCapsules

Latest Threads

Top