Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Adding white spaces between strings during concatenation in JSTL

843840May 26 2010 — edited May 26 2010
Please provide a way to add white space between strings during concatenation in JSTL.

I tried the following.
eg:
<c:set var="even_odd" value="odd">
<c:out value="first ${even_odd}"/>

I want the output string as "first odd ".

Moreover i am using the above value for generating the class attribute of a row of a table like

<tr class=<c:out value="first ${even_odd}"/>>

while printing the value of <c:out value="first ${even_odd}"/> in the page,i am getting correctly as i needed as "first odd".

But while taking the code of the page while rendering by the browser, it is showing like

<tr class="first" odd="">

I think the white space is the problem.

Please provide any solution or hint.

Comments

Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Jun 23 2010
Added on May 26 2010
2 comments
1,120 views