This rule flags JSP tags where a single quotes are nested within single quotes or double quotes are nested within double quotes.
Example 1:| <c:if test="<%=(link.indexOf(':') == -1)%>" > |
In this example, the test attribute contains the character sequence ':' which is nested in outer single quotes '<%=(link.indexOf(':') == -1)%>'. This rule would flag this example.
A quick fix for this rule is available in the source scanner. The quick fix escapes the nested quotes. In the example, the quotes surrounding the ':' are escaped.
Example 1 with the quick fix applied:| <c:if test="<%=(link.indexOf(\':\') == -1)%>" > |
Having nested quotes in the JSP tag can result in an error message
similar to the following example:
Error Message:JSPG0048E: Page
failed to validate using taglib validator for ... :
org.xml.sax.SAXParseException: Attribute name "jsp:id" associated
with an element type "c:if" must be followed by the " = " character.
Root
Cause:com.ibm.ws.jsp.translator.JspTranslationException: JSPG0048E:
Page failed to validate using taglib validator for...
For additional information see: