I want to use %> literal in JSP page. But it is throwing error. How to escape this syntax in JSP?

You can escape it using backslash character. Replace %> with %/>. Following example showcases the same.

      <title>A Comment Test</title>
      <h2>Syntax: <\%= (new java.util.Date()).toLocaleString() %\></h2>
      <p>Today's date: <%= (new java.util.Date()).toLocaleString()%></p>
karthikeya Boyini
karthikeya Boyini

I love programming (: That's all I know