Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to escape EL dollar signs?

Tags:

escaping

jsp

el

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?

like image 607
Dims Avatar asked Nov 25 '11 15:11

Dims


1 Answers

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

\${variable}

Alternatively, you can XML-escape the $:

${variable}
like image 188
BalusC Avatar answered Nov 16 '22 21:11

BalusC