firstly, I must apologize for bad english, it’s not my main language.
I’m using MySQL DB. So, I have a multiline string inside a DB. I read it in servlet and pass in jsp. In jsp I’m using something like this:
<script>
var foo = {
...
title: "<c:out value="${myMultilineString}"/>",
...
}
</script>
but is doesn’t works.
I tried to change source string like this:
1)”line1
line2″
on page it look like this:
title:”line1
line2″ this is an error
2)”line1\nline2″ no errors, but string isn’t multiline.
The html tag for changing line is < br />.
So try replacing your \n from database with < br /> and then assign it to tittle