Write string with quotes in c:out vaue?

牧云@^-^@ 提交于 2019-12-24 13:59:56

问题


I want to write a string with quotes in a jsp page which is using jstl tag c:out for its value that means I want to write: c:out value = '"4"' Please suggest asap..


回答1:


Did you try to use escapeXml attribute?

<c:out value='"4"' escapeXml="false"></c:out>




回答2:


Try this.

<c:out value='\\"4\\"'/>


来源:https://stackoverflow.com/questions/20425246/write-string-with-quotes-in-cout-vaue

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!