Is there a JSTL tag specifically for displaying messages, and only if there are messages to display? So that I don’t have to surround the displaying with an “c:if” tag.
If so, how do I use it? How should I add the messages to be displayed?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
This sounds like a job for
c:out. For example, this should display the value ofperson.name, or nothing if it isnull.If you want to display a default value in the case of a
null, then:or
(If this doesn’t answer your question, you need to be more explicit about what you mean by “messages” … and how you want them to be displayed.)
If you have zero or more messages in a collection: