| Author |
c:out trim problem
|
Prasad murali
Greenhorn
Joined: Feb 07, 2007
Posts: 4
|
|
Hi, I have a message to display using <c ut> <c ut value="${message}"/> where the message is a request attribute containing the string "The Lake". This string contains 3 whitespace between the words 'The' and 'Lake'. I need to display the message in the same way it is present but <c ut tag trims the whitespaces between the words and the string is displayed with only 1 whitespace between them. Thanks
|
 |
Christophe Verré
Sheriff
Joined: Nov 24, 2005
Posts: 14685
|
|
I don't think that c ut trim anything. I think that the HTML gets rid of the extra spaces. You could try to use JSTL's fn:replace function, to replace spaces with the HTML code "nbsp".
|
[My Blog]
All roads lead to JavaRanch
|
 |
Ben Souther
Sheriff
Joined: Dec 11, 2004
Posts: 13410
|
|
One thing to keep in mind is that HTML renderers (per their spec) will trim whitespace. Before looking at the c ut tag, or any other server side technology, always make sure to view the HTML source to see if the whitespace is actually being trimmed before it reaches your browser.
|
Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
|
 |
Prasad murali
Greenhorn
Joined: Feb 07, 2007
Posts: 4
|
|
|
Thank you guys for the response !!
|
 |
 |
|
|
subject: c:out trim problem
|
|
|