How can I replace true and false with yes or no using JSP and JSTL?
I have values TRUE and FALSE in my table.
I want when I retrieve these values using jstl on my jsp pages the true false will replace with YES AND NO
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.
I would suggest using a tagfile.
Create the tagfile, (say,
/WEB-INF/tags/yesno.tag) with something like this:Then in your JSP:
The tagfile is a bit cumbersome, but it’s well encapsulated and reusable.