How to escape EL dollar signs?
Asked Answered
T

1

15

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?

Tweed answered 25/11, 2011 at 15:13 Comment(0)
I
28

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

\${variable}

Alternatively, you can XML-escape the $:

${variable}
Inversely answered 25/11, 2011 at 15:14 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.