|
Lines 86-91
public class TomcatServletContainerTests {
Link Here
|
| 86 |
private static final String LOCATION_WAR_WITH_CONTEXT_XML_CROSS_CONTEXT = LOCATION_PREFIX |
86 |
private static final String LOCATION_WAR_WITH_CONTEXT_XML_CROSS_CONTEXT = LOCATION_PREFIX |
| 87 |
+ "../org.eclipse.gemini.web.test/src/test/resources/war-with-context-xml-cross-context.war?Web-ContextPath=/war-with-context-xml-cross-context"; |
87 |
+ "../org.eclipse.gemini.web.test/src/test/resources/war-with-context-xml-cross-context.war?Web-ContextPath=/war-with-context-xml-cross-context"; |
| 88 |
|
88 |
|
|
|
89 |
private static final String LOCATION_WAR_WITH_WEB_XML_FROM_FRAGMENT = "file:../org.eclipse.gemini.web.test/src/test/resources/war-with-web-xml-from-fragment.war"; |
| 90 |
|
| 91 |
private static final String LOCATION_FRAGMENT_PROVIDES_WEB_XML = "file:../org.eclipse.gemini.web.test/src/test/resources/fragment-provides-web-xml.jar"; |
| 92 |
|
| 89 |
private BundleContext bundleContext; |
93 |
private BundleContext bundleContext; |
| 90 |
|
94 |
|
| 91 |
private ServletContainer container; |
95 |
private ServletContainer container; |
|
Lines 444-449
public class TomcatServletContainerTests {
Link Here
|
| 444 |
} |
448 |
} |
| 445 |
} |
449 |
} |
| 446 |
|
450 |
|
|
|
451 |
@Test |
| 452 |
public void testWarWithWebXmlFromFragment() throws Exception { |
| 453 |
Bundle bundle = this.bundleContext.installBundle(LOCATION_WAR_WITH_WEB_XML_FROM_FRAGMENT); |
| 454 |
Bundle fragment = this.bundleContext.installBundle(LOCATION_FRAGMENT_PROVIDES_WEB_XML); |
| 455 |
|
| 456 |
bundle.start(); |
| 457 |
|
| 458 |
WebApplicationHandle handle = this.container.createWebApplication("/war-with-web-xml-from-fragment", bundle); |
| 459 |
this.container.startWebApplication(handle); |
| 460 |
try { |
| 461 |
validateURL("http://localhost:8080/war-with-web-xml-from-fragment"); |
| 462 |
} finally { |
| 463 |
this.container.stopWebApplication(handle); |
| 464 |
bundle.uninstall(); |
| 465 |
fragment.uninstall(); |
| 466 |
} |
| 467 |
} |
| 468 |
|
| 447 |
private void createFileWithContent(File file, String content) throws Exception { |
469 |
private void createFileWithContent(File file, String content) throws Exception { |
| 448 |
file.getParentFile().mkdirs(); |
470 |
file.getParentFile().mkdirs(); |
| 449 |
FileWriter fWriter = null; |
471 |
FileWriter fWriter = null; |