()
| 61 | } |
| 62 | |
| 63 | private void processWebDotXml() { |
| 64 | |
| 65 | // Very, very unlikely but just in case... |
| 66 | if (ctxt.getEffectiveMajorVersion() < 2) { |
| 67 | defaultIsELIgnored = "true"; |
| 68 | defaultDeferedSyntaxAllowedAsLiteral = "true"; |
| 69 | return; |
| 70 | } |
| 71 | if (ctxt.getEffectiveMajorVersion() == 2) { |
| 72 | if (ctxt.getEffectiveMinorVersion() < 5) { |
| 73 | defaultDeferedSyntaxAllowedAsLiteral = "true"; |
| 74 | } |
| 75 | if (ctxt.getEffectiveMinorVersion() < 4) { |
| 76 | defaultIsELIgnored = "true"; |
| 77 | return; |
| 78 | } |
| 79 | } |
| 80 | |
| 81 | JspConfigDescriptor jspConfig = ctxt.getJspConfigDescriptor(); |
| 82 | |
| 83 | if (jspConfig == null) { |
| 84 | return; |
| 85 | } |
| 86 | |
| 87 | jspProperties = new ArrayList<>(); |
| 88 | Collection<JspPropertyGroupDescriptor> jspPropertyGroups = jspConfig.getJspPropertyGroups(); |
| 89 | |
| 90 | for (JspPropertyGroupDescriptor jspPropertyGroup : jspPropertyGroups) { |
| 91 | |
| 92 | Collection<String> urlPatterns = jspPropertyGroup.getUrlPatterns(); |
| 93 | |
| 94 | if (urlPatterns.isEmpty()) { |
| 95 | continue; |
| 96 | } |
| 97 | |
| 98 | JspProperty property = new JspProperty(jspPropertyGroup.getIsXml(), jspPropertyGroup.getElIgnored(), |
| 99 | jspPropertyGroup.getErrorOnELNotFound(), jspPropertyGroup.getScriptingInvalid(), |
| 100 | jspPropertyGroup.getPageEncoding(), jspPropertyGroup.getIncludePreludes(), |
| 101 | jspPropertyGroup.getIncludeCodas(), jspPropertyGroup.getDeferredSyntaxAllowedAsLiteral(), |
| 102 | jspPropertyGroup.getTrimDirectiveWhitespaces(), jspPropertyGroup.getDefaultContentType(), |
| 103 | jspPropertyGroup.getBuffer(), jspPropertyGroup.getErrorOnUndeclaredNamespace()); |
| 104 | |
| 105 | // Add one JspPropertyGroup for each URL Pattern. This makes |
| 106 | // the matching logic easier. |
| 107 | for (String urlPattern : urlPatterns) { |
| 108 | String path = null; |
| 109 | String extension = null; |
| 110 | |
| 111 | if (urlPattern.indexOf('*') < 0) { |
| 112 | // Exact match |
| 113 | path = urlPattern; |
| 114 | } else { |
| 115 | int i = urlPattern.lastIndexOf('/'); |
| 116 | String file; |
| 117 | if (i >= 0) { |
| 118 | path = urlPattern.substring(0, i + 1); |
| 119 | file = urlPattern.substring(i + 1); |
| 120 | } else { |
no test coverage detected