How can I comment a JSP expression like: <%= map.size() %>
Is there something like <%= // map.size() %>?
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.
Pure JSP comments look like this:
So if you want to retain the ‘
=‘.you could do something like:The key thing is that
<%=defines the beginning of an expression, in which you can’t leave the body empty, but you could do something like this instead if the pure JSP comment doesn’t appeal to you:Code Conventions for the JavaServer Pages Technology Version 1.x Language has details about the different commenting options available to you (but has a complete lack of link targets, so I can’t link you directly to the relevant section – boo!)