使用或不使用< c:out>的JSP/JSTL;标签 [英] JSP/JSTL using or not using <c:out> tags
本文介绍了使用或不使用< c:out>的JSP/JSTL;标签的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在帮助开发基于Java jsp jstl的Web服务,并且所有动态对象都使用${object.foo}
插入,我想知道它是否确实存在于<c:out value="${object.foo} />
中是否有所作为?
i'm helping develop a java jsp jstl based web service and all dynamic objects are being inserted using ${object.foo}
and i was wondering if it made a difference whether or not it was actually in <c:out value="${object.foo} />
?
所有页面都可以正确加载,但是我想知道是否有我看不到的东西可能是个问题.
the pages all load correctly, but i wonder if there is something that i'm not seeing that may be an issue.
推荐答案
when you use JSTL core out tag, you have some more options:
- 您要传递给的值 标签默认为 转义为XML
- 您可以提供一个默认值 如果传递的值将显示 为空.
- The values that you are passing to the tag will be by default XML-escaped
- You can provide a default value which will be displayed if the value passed is null.
这篇关于使用或不使用< c:out>的JSP/JSTL;标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文