Determine the body type of <jsp:attribute> from the enclosing node
(Node n, String name)
| 1537 | * Determine the body type of <jsp:attribute> from the enclosing node |
| 1538 | */ |
| 1539 | private String getAttributeBodyType(Node n, String name) { |
| 1540 | |
| 1541 | if (n instanceof Node.CustomTag) { |
| 1542 | TagInfo tagInfo = ((Node.CustomTag) n).getTagInfo(); |
| 1543 | TagAttributeInfo[] tldAttrs = tagInfo.getAttributes(); |
| 1544 | for (TagAttributeInfo tldAttr : tldAttrs) { |
| 1545 | if (name.equals(tldAttr.getName())) { |
| 1546 | if (tldAttr.isFragment()) { |
| 1547 | return TagInfo.BODY_CONTENT_SCRIPTLESS; |
| 1548 | } |
| 1549 | if (tldAttr.canBeRequestTime()) { |
| 1550 | return TagInfo.BODY_CONTENT_JSP; |
| 1551 | } |
| 1552 | } |
| 1553 | } |
| 1554 | if (tagInfo.hasDynamicAttributes()) { |
| 1555 | return TagInfo.BODY_CONTENT_JSP; |
| 1556 | } |
| 1557 | } else if (n instanceof Node.IncludeAction) { |
| 1558 | if ("page".equals(name)) { |
| 1559 | return TagInfo.BODY_CONTENT_JSP; |
| 1560 | } |
| 1561 | } else if (n instanceof Node.ForwardAction) { |
| 1562 | if ("page".equals(name)) { |
| 1563 | return TagInfo.BODY_CONTENT_JSP; |
| 1564 | } |
| 1565 | } else if (n instanceof Node.SetProperty) { |
| 1566 | if ("value".equals(name)) { |
| 1567 | return TagInfo.BODY_CONTENT_JSP; |
| 1568 | } |
| 1569 | } else if (n instanceof Node.UseBean) { |
| 1570 | if ("beanName".equals(name)) { |
| 1571 | return TagInfo.BODY_CONTENT_JSP; |
| 1572 | } |
| 1573 | } else if (n instanceof Node.ParamAction) { |
| 1574 | if ("value".equals(name)) { |
| 1575 | return TagInfo.BODY_CONTENT_JSP; |
| 1576 | } |
| 1577 | } else if (n instanceof Node.JspElement) { |
| 1578 | return TagInfo.BODY_CONTENT_JSP; |
| 1579 | } |
| 1580 | |
| 1581 | return JAVAX_BODY_CONTENT_TEMPLATE_TEXT; |
| 1582 | } |
| 1583 | |
| 1584 | private void parseFileDirectives(Node parent) throws JasperException { |
| 1585 | reader.skipUntil("<"); |
no test coverage detected