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?

1 Answer 1

28

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

\${variable}

Alternatively, you can XML-escape the $:

${variable}
0

Not the answer you're looking for? Browse other questions tagged or ask your own question.