<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<c:catch var="ex" >
<% int j=3/0; %>
</c:catch>
<c:out value="${ex.message}" />
prints,
/ by zero
Code Examples and Resolutions to Issues with Java, J2EE, JEE, Servlets, Java Server Pages (JSP), Struts Framework 1.x, Struts Framework 2, Spring Framework, Hibernate Framework, JBoss, Tomcat, Java Server Faces (JSF) and other assorted tools and technologies
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<c:catch var="ex" >
<% int j=3/0; %>
</c:catch>
<c:out value="${ex.message}" />
Dinesh,
ReplyDeleteYou told us to use EL and JSTL instead of scripting elements. Can you modify current examples so that they don't use scripting elements? This would provide a separation between EL/JSTL and scripting elements.
These examples are designed to quickly teach the JSTL tags. To completely avoid scripting elements would entail writing a full-fledged web application with an MVC architecture.
ReplyDelete