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
  • 85,780
  • 21
  • 159
  • 179
Nizamuddin Shaikh
  • 383
  • 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,637
  • 4
  • 20
  • 33