Reputation: 179
So I have set the following parameters in my web.xml
:
<context-param>
<param-name>defaultHtmlEscape</param-name>
<param-value>true</param-value>
</context-param>
Will this automatically escape outputs for the field by only declaring in the JSP:
<input type="text" class="form-control" id="label" name="label" value="${field.label}">
or do I need to use the <spring:
? Or use the <form:
tags?
Update:
This question is just a matter of yes/no. And maybe a brief answer regarding how to activate the params in the JSP-side. My question is after I set the params in web.xml
. So do i need to use <spring:
or <form:
tags in the JSP or I can use plain <input type...
tags?
Upvotes: 2
Views: 7135
Reputation: 392
The escaping applies only to the Spring MVC tags. For example:
<form:input path="field" htmlEscape="true" />
Upvotes: 4