MCPcopy Index your code
hub / github.com/apache/tomcat / processWebDotXml

Method processWebDotXml

java/org/apache/jasper/compiler/JspConfig.java:63–149  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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 {

Callers 1

initMethod · 0.95

Calls 15

getJspPropertyGroupsMethod · 0.95
getMessageMethod · 0.95
getUrlPatternsMethod · 0.65
getIsXmlMethod · 0.65
getElIgnoredMethod · 0.65
getErrorOnELNotFoundMethod · 0.65
getScriptingInvalidMethod · 0.65
getPageEncodingMethod · 0.65
getIncludePreludesMethod · 0.65

Tested by

no test coverage detected