I more or less know the difference between <%! and <%, but I can\'t seem to find the difference between <%= and <%. I\'m trying to avoid a null value error by intr
Between <%...%>
you can write any logic that you want in java.
Using <%=...%>
will output the result of the expression between the brackets to the screen. So instead of writing for example
<% System.out.println("Hello World") %>
you can simply write
<%= "Hello world" %>
Basically, what <%= %> does is to call the toString() method of the expression that is being evaluated.
If you need to add null check logic as you said you need you can use
<%..%>
Here's a link you can refer to:
http://www.easywayserver.com/jsp/JSP-example.htm http://www.tutorialspoint.com/jsp/jsp_syntax.htm