14

I wish to write JSP which generates XML file, which has syntax, similiar to XML with EL expressions. In other words, I wish to let JSP to process only my expressions, but leave foreign expressions intact.

Is it possible to escape the EL like ${variable} so that it get displayed as is?

BalusC
  • 1,040,783
  • 362
  • 3,548
  • 3,513
Dims
  • 42,427
  • 94
  • 291
  • 543

1 Answers1

26

You can just put \ in front to escape the EL expression:

\${variable}

Alternatively, you can XML-escape the $:

${variable}
BalusC
  • 1,040,783
  • 362
  • 3,548
  • 3,513