Hi in my jsp page i am testing a condition
<jsp:scriptlet>
if (session.getAttribute("empid") != null && session.getAttribute("empid") != "")
{
.......
}
But i am getting compiler error.
The entity name must immediately follow the '&' in the entity reference.
any body know how to solve this?
The answer depends a bit on the type of JSP page you are using.
If you use normal JSP pages, you can choose between replacing your <jsp:scriptlet>
tags with <% %>
or escaping all XML entities (like &
as &
or <
as <
).
However, if you are using JSPX (also called JSP document), your only choice is to escape the XML entities.