@@ -58,7 +58,7 @@ public void testVirtualClassLoader() throws Exception {
58
58
59
59
Tomcat tomcat = getTomcatInstance ();
60
60
61
- File appDir = new File ("test/webapp-virtual-webapp/src/main/webapp" );
61
+ File appDir = new File ("test/webapp-virtual-webapp/src/main/webapp-a " );
62
62
// app dir is relative to server home
63
63
StandardContext ctx = (StandardContext ) tomcat .addWebapp (null , "/test" ,
64
64
appDir .getAbsolutePath ());
@@ -67,11 +67,11 @@ public void testVirtualClassLoader() throws Exception {
67
67
File f1 = new File ("test/webapp-virtual-webapp/target/classes" );
68
68
File f2 = new File ("test/webapp-virtual-library/target/WEB-INF" );
69
69
File f3 = new File (
70
- "test/webapp-virtual-webapp/src/main/webapp/WEB-INF/classes" );
70
+ "test/webapp-virtual-webapp/src/main/webapp-a /WEB-INF/classes" );
71
71
File f4 = new File (
72
- "test/webapp-virtual-webapp/src/main/webapp2 /WEB-INF/classes" );
72
+ "test/webapp-virtual-webapp/src/main/webapp-b /WEB-INF/classes" );
73
73
File f5 = new File ("test/webapp-virtual-webapp/src/main/misc" );
74
- File f6 = new File ("test/webapp-virtual-webapp/src/main/webapp2 " );
74
+ File f6 = new File ("test/webapp-virtual-webapp/src/main/webapp-b " );
75
75
ctx .getResources ().createWebResourceSet (
76
76
WebResourceRoot .ResourceSetType .POST , "/WEB-INF/classes" ,
77
77
f1 .getAbsolutePath (), null , "/" );
@@ -143,13 +143,13 @@ public void testVirtualClassLoader() throws Exception {
143
143
"/test/classpathGetResources.jsp?path=rsrc/" ).toString ();
144
144
Assert .assertTrue (
145
145
allUrls ,
146
- allUrls .indexOf ("/test/webapp-virtual-webapp/src/main/webapp/WEB-INF/classes/rsrc" ) > 0 );
146
+ allUrls .indexOf ("/test/webapp-virtual-webapp/src/main/webapp-a /WEB-INF/classes/rsrc" ) > 0 );
147
147
Assert .assertTrue (
148
148
allUrls ,
149
- allUrls .indexOf ("/test/webapp-virtual-webapp/src/main/webapp2 /WEB-INF/classes/rsrc" ) > 0 );
149
+ allUrls .indexOf ("/test/webapp-virtual-webapp/src/main/webapp-b /WEB-INF/classes/rsrc" ) > 0 );
150
150
Assert .assertTrue (
151
151
allUrls ,
152
- allUrls .indexOf ("/test/webapp-virtual-webapp/src/main/webapp/WEB-INF/lib/rsrc.jar!/rsrc" ) > 0 );
152
+ allUrls .indexOf ("/test/webapp-virtual-webapp/src/main/webapp-a /WEB-INF/lib/rsrc.jar!/rsrc" ) > 0 );
153
153
Assert .assertTrue (
154
154
allUrls ,
155
155
allUrls .indexOf ("/test/webapp-virtual-webapp/target/classes/rsrc" ) > 0 );
@@ -165,10 +165,10 @@ public void testVirtualClassLoader() throws Exception {
165
165
String allRsrsc2ClasspathUrls =
166
166
getUrl (
167
167
"http://localhost:" + getPort () +
168
- "/test/classpathGetResources.jsp?path=rsrc2 /" ).toString ();
168
+ "/test/classpathGetResources.jsp?path=rsrc-2 /" ).toString ();
169
169
Assert .assertTrue (
170
170
allRsrsc2ClasspathUrls ,
171
- allRsrsc2ClasspathUrls .indexOf ("/test/webapp-virtual-webapp/src/main/webapp2 /WEB-INF/classes/rsrc2 " ) > 0 );
171
+ allRsrsc2ClasspathUrls .indexOf ("/test/webapp-virtual-webapp/src/main/webapp-b /WEB-INF/classes/rsrc-2 " ) > 0 );
172
172
173
173
// tests context.getRealPath
174
174
@@ -180,7 +180,7 @@ public void testVirtualClassLoader() throws Exception {
180
180
// Real paths depend on the OS and this test has to work on all
181
181
// platforms so use File to convert the path to a platform specific form
182
182
File f = new File (
183
- "test/webapp-virtual-webapp/src/main/webapp/rsrc/resourceF.properties" );
183
+ "test/webapp-virtual-webapp/src/main/webapp-a /rsrc/resourceF.properties" );
184
184
assertPageContains (
185
185
"/test/contextGetRealPath.jsp?path=/rsrc/resourceF.properties" ,
186
186
f .getPath ());
@@ -202,7 +202,7 @@ public void testVirtualClassLoader() throws Exception {
202
202
"/test/contextGetResource.jsp?path=/other/resourceI.properties" ,
203
203
"resourceIInWebapp=true" );
204
204
assertPageContains (
205
- "/test/contextGetResource.jsp?path=/rsrc2 /resourceJ.properties" ,
205
+ "/test/contextGetResource.jsp?path=/rsrc-2 /resourceJ.properties" ,
206
206
"resourceJInWebapp=true" );
207
207
208
208
String allRsrcPaths =
@@ -227,10 +227,10 @@ public void testVirtualClassLoader() throws Exception {
227
227
String allRsrc2Paths =
228
228
getUrl (
229
229
"http://localhost:" + getPort () +
230
- "/test/contextGetResourcePaths.jsp?path=/rsrc2 /" ).toString ();
230
+ "/test/contextGetResourcePaths.jsp?path=/rsrc-2 /" ).toString ();
231
231
Assert .assertTrue (
232
232
allRsrc2Paths ,
233
- allRsrc2Paths .indexOf ("/rsrc2 /resourceJ.properties" ) > 0 );
233
+ allRsrc2Paths .indexOf ("/rsrc-2 /resourceJ.properties" ) > 0 );
234
234
235
235
assertPageContains (
236
236
"/test/testTlds.jsp" ,
@@ -250,7 +250,7 @@ public void testVirtualClassLoader() throws Exception {
250
250
public void testAdditionalWebInfClassesPaths () throws Exception {
251
251
Tomcat tomcat = getTomcatInstance ();
252
252
253
- File appDir = new File ("test/webapp-virtual-webapp/src/main/webapp" );
253
+ File appDir = new File ("test/webapp-virtual-webapp/src/main/webapp-a " );
254
254
// app dir is relative to server home
255
255
StandardContext ctx = (StandardContext ) tomcat .addWebapp (null , "/test" ,
256
256
appDir .getAbsolutePath ());
0 commit comments