2

I found a problem with setting value in jsp. I have an element to be stored in database, if I provide its value with "phenom<name" In the database it saves as "phenom<name".but while displaying data to user text after "<" symbol gets truncated and it displays as "phenom<" instead of "phenom<name"

Tushar
  • 82,599
  • 19
  • 151
  • 169
Nizamuddin Shaikh
  • 353
  • 1
  • 4
  • 13

1 Answers1

1

You need to escape it..

<c:out value="phenom<name" />

or

${fn:escapeXml('phenom<name')}

or

"phenom&lt;name"
Severino Lorilla Jr.
  • 1,617
  • 4
  • 20
  • 33