A article is reproduced here: https://blog.csdn.net/sinat_37062120/article/details/79208949
Insert Java code into the JSP
Insert Java code into the JSP
<%if (***)%>
<%=***%>
<%else %>
<%=***%>
Error in the “else” in the third line
Syntax error on token “else”, delete this token
else must be followed by if. This error indicates that if
solution is not found:
add parentheses. Note that the “} “of if must be written inside the” else”
<%if (***) {%>
<%=***%>
<%} else {%>
<%=***%>
<%}%>
div>