Create or Update JSP Tags
Create or update JSP tags to encapsulate JSP logic used across multiple pages.
Best Practice Guidelines
SAP recommends these guidelines for software developers extending SAP Commerce Cloud.
- Apply spring:htmlEscape in the code of JSP tags
-
If a JSP defines spring:htmlEscape, it does not seem to be propagated to the tags used within that JSP. Therefore, ensure spring:htmlEscape is also included in tag files so that affects the tag's logic. Use it in tag files in the same way as it is in JSP files. The following displays a compliant example:
<%@ taglib ... %> <%@ taglib ... %> <%@ attribute ... %> <%@ attribute ... %> <spring:htmlEscape defaultHtmlEscape= "true"/> <spring:url ... htmlEscape= "false"/>