Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 183453 Details for
Bug 329979
Provide integration test for supplying web.xml in a fragment
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Integration test for supplying web.xml in a fragment
IntegrationTest.patch (text/plain), 8.84 KB, created by
Violeta Georgieva
on 2010-11-19 04:07:26 EST
(
hide
)
Description:
Integration test for supplying web.xml in a fragment
Filename:
MIME Type:
Creator:
Violeta Georgieva
Created:
2010-11-19 04:07:26 EST
Size:
8.84 KB
patch
obsolete
>diff --git a/build-web-container/build.xml b/build-web-container/build.xml >index 6974a2c..06b856b 100644 >--- a/build-web-container/build.xml >+++ b/build-web-container/build.xml >@@ -29,6 +29,8 @@ > <pathelement location="../test-bundles/war-with-jsp"/> > <pathelement location="../test-bundles/war-with-servlet"/> > <pathelement location="../test-bundles/war-with-tld"/> >+ <pathelement location="../test-bundles/fragment-provides-web-xml"/> >+ <pathelement location="../test-bundles/war-with-web-xml-from-fragment"/> > </path> > > <target name="test" depends="build-test-apps, quality-multi-bundle.test" description="Rebuild all the test apps before running the test suites"> >diff --git a/org.eclipse.gemini.web.test/src/test/java/org/eclipse/gemini/web/test/tomcat/TomcatServletContainerTests.java b/org.eclipse.gemini.web.test/src/test/java/org/eclipse/gemini/web/test/tomcat/TomcatServletContainerTests.java >index 0c2587a..0c677c1 100644 >--- a/org.eclipse.gemini.web.test/src/test/java/org/eclipse/gemini/web/test/tomcat/TomcatServletContainerTests.java >+++ b/org.eclipse.gemini.web.test/src/test/java/org/eclipse/gemini/web/test/tomcat/TomcatServletContainerTests.java >@@ -86,6 +86,10 @@ public class TomcatServletContainerTests { > private static final String LOCATION_WAR_WITH_CONTEXT_XML_CROSS_CONTEXT = LOCATION_PREFIX > + "../org.eclipse.gemini.web.test/src/test/resources/war-with-context-xml-cross-context.war?Web-ContextPath=/war-with-context-xml-cross-context"; > >+ private static final String LOCATION_WAR_WITH_WEB_XML_FROM_FRAGMENT = "file:../org.eclipse.gemini.web.test/target/resources/war-with-web-xml-from-fragment.war"; >+ >+ private static final String LOCATION_FRAGMENT_PROVIDES_WEB_XML = "file:../org.eclipse.gemini.web.test/target/resources/fragment-provides-web-xml.jar"; >+ > private BundleContext bundleContext; > > private ServletContainer container; >@@ -444,6 +448,24 @@ public class TomcatServletContainerTests { > } > } > >+ @Test >+ public void testWarWithWebXmlFromFragment() throws Exception { >+ Bundle bundle = this.bundleContext.installBundle(LOCATION_WAR_WITH_WEB_XML_FROM_FRAGMENT); >+ Bundle fragment = this.bundleContext.installBundle(LOCATION_FRAGMENT_PROVIDES_WEB_XML); >+ >+ bundle.start(); >+ >+ WebApplicationHandle handle = this.container.createWebApplication("/war-with-web-xml-from-fragment", bundle); >+ this.container.startWebApplication(handle); >+ try { >+ validateURL("http://localhost:8080/war-with-web-xml-from-fragment"); >+ } finally { >+ this.container.stopWebApplication(handle); >+ bundle.uninstall(); >+ fragment.uninstall(); >+ } >+ } >+ > private void createFileWithContent(File file, String content) throws Exception { > file.getParentFile().mkdirs(); > FileWriter fWriter = null; >diff --git a/test-bundles/fragment-provides-web-xml/build.xml b/test-bundles/fragment-provides-web-xml/build.xml >new file mode 100755 >index 0000000..ff11bb5 >--- /dev/null >+++ b/test-bundles/fragment-provides-web-xml/build.xml >@@ -0,0 +1,9 @@ >+<?xml version="1.0" encoding="UTF-8"?> >+<project name="fragment-provides-web-xml"> >+ >+ <property file="${basedir}/../build.properties"/> >+ <property file="${basedir}/../../build.versions"/> >+ <property name="jar.output.dir" value="${basedir}/../../org.eclipse.gemini.web.test/target/resources"/> >+ <import file="${basedir}/../../virgo-build/standard/default.xml"/> >+ >+</project> >diff --git a/test-bundles/fragment-provides-web-xml/ivy.xml b/test-bundles/fragment-provides-web-xml/ivy.xml >new file mode 100755 >index 0000000..d377163 >--- /dev/null >+++ b/test-bundles/fragment-provides-web-xml/ivy.xml >@@ -0,0 +1,22 @@ >+<?xml version="1.0" encoding="UTF-8"?> >+<?xml-stylesheet type="text/xsl" href="http://ivyrep.jayasoft.org/ivy-doc.xsl"?> >+<ivy-module >+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >+ xsi:noNamespaceSchemaLocation="http://incubator.apache.org/ivy/schemas/ivy.xsd" >+ version="1.3"> >+ >+ <info organisation="org.eclipse.gemini.web" module="${ant.project.name}"/> >+ >+ <configurations> >+ <include file="${virgo.build.dir}/common/default-ivy-configurations.xml"/> >+ </configurations> >+ >+ <publications> >+ <artifact name="${ant.project.name}"/> >+ <artifact name="${ant.project.name}-sources" type="src" ext="jar"/> >+ </publications> >+ >+ <dependencies> >+ </dependencies> >+ >+</ivy-module> >diff --git a/test-bundles/fragment-provides-web-xml/src/main/java/.gitignore b/test-bundles/fragment-provides-web-xml/src/main/java/.gitignore >new file mode 100755 >index 0000000..e69de29 >diff --git a/test-bundles/fragment-provides-web-xml/src/main/resources/META-INF/MANIFEST.MF b/test-bundles/fragment-provides-web-xml/src/main/resources/META-INF/MANIFEST.MF >new file mode 100755 >index 0000000..836ff38 >--- /dev/null >+++ b/test-bundles/fragment-provides-web-xml/src/main/resources/META-INF/MANIFEST.MF >@@ -0,0 +1,8 @@ >+Manifest-Version: 1.0 >+Bundle-ManifestVersion: 2 >+Bundle-SymbolicName: fragment-provides-web-xml >+Fragment-Host: war-with-web-xml-from-fragment;bundle-version=1.0.0 >+Bundle-Version: 1.0.0 >+Bundle-Description: Fragment that provides web.xml >+ >+ >diff --git a/test-bundles/fragment-provides-web-xml/src/main/resources/WEB-INF/web.xml b/test-bundles/fragment-provides-web-xml/src/main/resources/WEB-INF/web.xml >new file mode 100755 >index 0000000..17fffb2 >--- /dev/null >+++ b/test-bundles/fragment-provides-web-xml/src/main/resources/WEB-INF/web.xml >@@ -0,0 +1,6 @@ >+<?xml version="1.0" encoding="UTF-8"?> >+<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5"> >+ <welcome-file-list> >+ <welcome-file>welcome.jsp</welcome-file> >+ </welcome-file-list> >+</web-app> >diff --git a/test-bundles/war-with-web-xml-from-fragment/build.xml b/test-bundles/war-with-web-xml-from-fragment/build.xml >new file mode 100755 >index 0000000..3112703 >--- /dev/null >+++ b/test-bundles/war-with-web-xml-from-fragment/build.xml >@@ -0,0 +1,9 @@ >+<?xml version="1.0" encoding="UTF-8"?> >+<project name="war-with-web-xml-from-fragment"> >+ >+ <property file="${basedir}/../build.properties"/> >+ <property file="${basedir}/../../build.versions"/> >+ <property name="war.output.dir" value="${basedir}/../../org.eclipse.gemini.web.test/target/resources"/> >+ <import file="${basedir}/../../virgo-build/war/default.xml"/> >+ >+</project> >diff --git a/test-bundles/war-with-web-xml-from-fragment/ivy.xml b/test-bundles/war-with-web-xml-from-fragment/ivy.xml >new file mode 100755 >index 0000000..6b5a9c8 >--- /dev/null >+++ b/test-bundles/war-with-web-xml-from-fragment/ivy.xml >@@ -0,0 +1,22 @@ >+<?xml version="1.0" encoding="UTF-8"?> >+<?xml-stylesheet type="text/xsl" href="http://ivyrep.jayasoft.org/ivy-doc.xsl"?> >+<ivy-module >+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >+ xsi:noNamespaceSchemaLocation="http://incubator.apache.org/ivy/schemas/ivy.xsd" >+ version="1.3"> >+ >+ <info organisation="org.eclipse.gemini.web" module="${ant.project.name}"/> >+ >+ <configurations> >+ <include file="${virgo.build.dir}/common/default-ivy-configurations.xml"/> >+ </configurations> >+ >+ <publications> >+ <artifact name="${ant.project.name}" type="war" ext="war"/> >+ <artifact name="${ant.project.name}-sources" type="src" ext="jar"/> >+ </publications> >+ >+ <dependencies> >+ </dependencies> >+ >+</ivy-module> >diff --git a/test-bundles/war-with-web-xml-from-fragment/src/main/java/.gitignore b/test-bundles/war-with-web-xml-from-fragment/src/main/java/.gitignore >new file mode 100755 >index 0000000..e69de29 >diff --git a/test-bundles/war-with-web-xml-from-fragment/src/main/webapp/META-INF/MANIFEST.MF b/test-bundles/war-with-web-xml-from-fragment/src/main/webapp/META-INF/MANIFEST.MF >new file mode 100755 >index 0000000..bb9ea79 >--- /dev/null >+++ b/test-bundles/war-with-web-xml-from-fragment/src/main/webapp/META-INF/MANIFEST.MF >@@ -0,0 +1,14 @@ >+Manifest-Version: 1.0 >+Bundle-ManifestVersion: 2 >+Bundle-SymbolicName: war-with-web-xml-from-fragment >+Bundle-Version: 1.0.0 >+Web-ContextPath: /war-with-web-xml-from-fragment >+Import-Packages: javax.servlet, >+ javax.servlet.http, >+ javax.servlet.jsp, >+ javax.servlet.jsp.el, >+ javax.servlet.jsp.tagext, >+ javax.el >+Bundle-Description: Web application without web.xml >+ >+ >diff --git a/test-bundles/war-with-web-xml-from-fragment/src/main/webapp/welcome.jsp b/test-bundles/war-with-web-xml-from-fragment/src/main/webapp/welcome.jsp >new file mode 100755 >index 0000000..e51ff7a >--- /dev/null >+++ b/test-bundles/war-with-web-xml-from-fragment/src/main/webapp/welcome.jsp >@@ -0,0 +1,8 @@ >+<html> >+ <head> >+ <title>web.xml provided by a fragment</title> >+ </head> >+ <body> >+ Hello World! >+ </body> >+</html> >\ No newline at end of file
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
glyn.normington
:
iplog+
Actions:
View
|
Diff
Attachments on
bug 329979
:
182968
| 183453