File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
Ch04_OutputEscapingJSP/src/main/webapp/WEB-INF/views Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change 11<%@ page language =" java" contentType =" text/html; charset=UTF-8" pageEncoding =" UTF-8" %>
22<%@ taglib prefix =" c" uri =" http://java.sun.com/jsp/jstl/core" %>
3+ <%@ taglib prefix =" s" uri =" http://www.springframework.org/tags" %>
34<html >
45 <head >
56 <meta http-equiv =" Content-Type" content =" text/html; charset=UTF-8" >
910 <body >
1011 <h1 >Ch04_OutputEscapingJSP: New Contact</h1 >
1112
12- <h2 >Input with direct value expression</h2 >
13- <p ><strong >Hello </strong > ${ contact. firstname } ${ contact. lastname } </p >
13+ <h2 >Input displayed as direct value expression</h2 >
14+ <p ><strong >Contact details: </strong > ${ contact. firstname } ${ contact. lastname } </p >
1415
15- <h2 >Input with out element</h2 >
16- <p ><strong >Hello</strong > <c:out value =" ${ contact. firstname } " /> <c:out value =" ${ contact. lastname } " /></p >
16+ <h2 >Input displayed as out element</h2 >
17+ <p ><strong >Contact details:</strong > <c:out value =" ${ contact. firstname } " /> <c:out value =" ${ contact. lastname } " /></p >
18+
19+ <h2 >Input displayed inside Spring escapeBody element as direct value expression</h2 >
20+ <p ><strong >Contact details:</strong > <s:escapeBody htmlEscape =" true" >${ contact. firstname } ${ contact. lastname } </s:escapeBody > </p >
1721 </body >
1822</html >
You can’t perform that action at this time.
0 commit comments