Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.1k views
in Technique[技术] by (71.8m points)

java - JSP/JSTL using or not using <c:out> tags

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.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

when you use JSTL core out tag, you have some more options:

  • 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.

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...