如何逃避EL美元符号? [英] How to escape EL dollar signs?
本文介绍了如何逃避EL美元符号?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我希望编写生成 XML 文件的 JSP,该文件具有语法,类似于带有 EL 表达式的 XML.换句话说,我希望让 JSP 只处理 my 表达式,而保留 foreign 表达式完整.
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.
是否可以像 ${variable}
一样转义 EL 使其按原样显示?
Is it possible to escape the EL like ${variable}
so that it get displayed as is?
推荐答案
你可以把 放在前面来转义 EL 表达式:
You can just put in front to escape the EL expression:
${variable}
或者,您可以对 $
进行 XML 转义:
Alternatively, you can XML-escape the $
:
${variable}
这篇关于如何逃避EL美元符号?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文