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!

JSTL remove line breaks

843840Sep 4 2007 — edited Sep 4 2007
I don't know how to put this, so it's possible that the title isn't entirely correct :-).

In my JSP-file, I have the following code:
onclick="showFullName('${subject.name}', '${subject.surname}');"
When everything is compiled, following HTML code is shown on the page:
onclick="showFullName('Jackson', 'Michael
');"
The problem is, it generates 2 lines, instead of 1. When you press that button, Javascript generates an error, saying that string literal isnt terminated. When I just print out ${subject.surname}, there's also a line break.

Is it possible to remove that line break?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 2 2007
Added on Sep 4 2007
2 comments
603 views