Skip to content

Commit

Permalink
Rename webapp-3.0 test webapp to webapp.
Browse files Browse the repository at this point in the history
Tests that are not explicitly designed for a specific web application version will remain in this new location.
Tests that require an specific web application version to be declared in web.xml will be moved back to the (soon to be re-created) webapp-3.0 location

git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1480976 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
markt-asf committed May 10, 2013
1 parent e52ed47 commit c40e1ee
Show file tree
Hide file tree
Showing 185 changed files with 130 additions and 130 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
logs
nbproject
output
# Next line commented out, because test/webapp-3.0-virtual-library and
# test/webapp-3.0-virtual-webapp use it:
# Next line commented out, because test/webapp-virtual-library and
# test/webapp-virtual-webapp use it:
# target
work
build.properties
Expand Down
8 changes: 4 additions & 4 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -510,8 +510,8 @@
<exclude name="**/org/apache/tomcat/dbcp/**"/>
<exclude name="**/tomcat-deps/**"/>
<!-- Exclude simple test files -->
<exclude name="test/webapp-3.0/bug53257/**/*.txt"/>
<exclude name="test/webapp-3.0-fragments/WEB-INF/classes/*.txt"/>
<exclude name="test/webapp/bug53257/**/*.txt"/>
<exclude name="test/webapp-fragments/WEB-INF/classes/*.txt"/>
<exclude name="test/webresources/**"/>
</fileset>
<fileset dir="modules/jdbc-pool" >
Expand Down Expand Up @@ -1831,8 +1831,8 @@ Apache Tomcat ${version} native binaries for Win64 AMD64/EMT64 platform.
<filename name="**/.project"/>
<filename name="**/output/**"/>
<!-- Commented out, because
test/webapp-3.0-virtual-library and
test/webapp-3.0-virtual-webapp use it:
test/webapp-virtual-library and
test/webapp-virtual-webapp use it:
<filename name="**/target/**"/>
-->
<filename name="**/build.properties"/>
Expand Down
8 changes: 4 additions & 4 deletions res/rat/rat-excludes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ output/dist/webapps/docs/api/package-list
output/dist/webapps/docs/elapi/package-list
output/dist/webapps/docs/jspapi/package-list
output/dist/webapps/docs/servletapi/package-list
output/dist/src/test/webapp-3.0/bug53257/*.txt
output/dist/src/test/webapp-3.0-fragments/WEB-INF/classes/*.txt
test/webapp-3.0/bug53257/*.txt
test/webapp-3.0-fragments/WEB-INF/classes/*.txt
output/dist/src/test/webapp/bug53257/*.txt
output/dist/src/test/webapp-fragments/WEB-INF/classes/*.txt
test/webapp/bug53257/*.txt
test/webapp-fragments/WEB-INF/classes/*.txt
2 changes: 1 addition & 1 deletion test/javax/el/TestCompositeELResolver.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public class TestCompositeELResolver extends TomcatBaseTest {
public void testBug50408() throws Exception {
Tomcat tomcat = getTomcatInstance();

File appDir = new File("test/webapp-3.0");
File appDir = new File("test/webapp");
// app dir is relative to server home
StandardContext ctxt = (StandardContext) tomcat.addWebapp(null,
"/test", appDir.getAbsolutePath());
Expand Down
2 changes: 1 addition & 1 deletion test/javax/servlet/jsp/TestPageContext.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public class TestPageContext extends TomcatBaseTest {
public void testBug49196() throws Exception {
Tomcat tomcat = getTomcatInstance();

File appDir = new File("test/webapp-3.0");
File appDir = new File("test/webapp");
// app dir is relative to server home
tomcat.addWebapp(null, "/test", appDir.getAbsolutePath());

Expand Down
6 changes: 3 additions & 3 deletions test/org/apache/catalina/core/TestApplicationContext.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public class TestApplicationContext extends TomcatBaseTest {
public void testBug53257() throws Exception {
Tomcat tomcat = getTomcatInstance();

File appDir = new File("test/webapp-3.0");
File appDir = new File("test/webapp");
// app dir is relative to server home
tomcat.addWebapp(null, "/test", appDir.getAbsolutePath());

Expand All @@ -59,7 +59,7 @@ public void testBug53257() throws Exception {
public void testBug53467() throws Exception {
Tomcat tomcat = getTomcatInstance();

File appDir = new File("test/webapp-3.0");
File appDir = new File("test/webapp");
// app dir is relative to server home
tomcat.addWebapp(null, "/test", appDir.getAbsolutePath());

Expand Down Expand Up @@ -101,7 +101,7 @@ public void testAddServletWithServletNameEmptyString() {
private ServletContext getServletContext() {
Tomcat tomcat = getTomcatInstance();

File appDir = new File("test/webapp-3.0");
File appDir = new File("test/webapp");
// app dir is relative to server home
StandardContext standardContext = (StandardContext) tomcat.addWebapp(
null, "/test", appDir.getAbsolutePath());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ private DefaultInstanceManager doClassUnloadingPrep() throws Exception {

// Create the context (don't use addWebapp as we want to modify the
// JSP Servlet settings).
File appDir = new File("test/webapp-3.0");
File appDir = new File("test/webapp");
StandardContext ctxt = (StandardContext) tomcat.addContext(
null, "/test", appDir.getAbsolutePath());

Expand Down
6 changes: 3 additions & 3 deletions test/org/apache/catalina/core/TestStandardContext.java
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ public void testWebappLoaderStartFail() throws Exception {
((ContainerBase) tomcat.getHost()).setStartChildren(false);

FailingWebappLoader loader = new FailingWebappLoader();
File root = new File("test/webapp-3.0");
File root = new File("test/webapp");
Context context = tomcat.addWebapp("", root.getAbsolutePath());
context.setLoader(loader);

Expand Down Expand Up @@ -226,7 +226,7 @@ public void testWebappListenerConfigureFail() throws Exception {
((ContainerBase) tomcat.getHost()).setStartChildren(false);

FailingLifecycleListener listener = new FailingLifecycleListener();
File root = new File("test/webapp-3.0");
File root = new File("test/webapp");
Context context = tomcat.addWebapp("", root.getAbsolutePath());
context.addLifecycleListener(listener);

Expand Down Expand Up @@ -286,7 +286,7 @@ public void testBug49922() throws Exception {
// Set up a container
Tomcat tomcat = getTomcatInstance();

File root = new File("test/webapp-3.0");
File root = new File("test/webapp");
tomcat.addWebapp("", root.getAbsolutePath());

tomcat.start();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public void setUp() throws Exception {
public void testResources() throws Exception {
Tomcat tomcat = getTomcatInstance();

File appDir = new File("test/webapp-3.0-fragments");
File appDir = new File("test/webapp-fragments");
// app dir is relative to server home
Context ctx = tomcat.addWebapp(null, "/test", appDir.getAbsolutePath());

Expand Down Expand Up @@ -104,7 +104,7 @@ public void testResourcesWebInfClasses() throws Exception {
Tomcat tomcat = getTomcatInstance();

// app dir is relative to server home
File appDir = new File("test/webapp-3.0-fragments");
File appDir = new File("test/webapp-fragments");

// Need to cast to be able to set StandardContext specific attribute
StandardContext ctxt = (StandardContext)
Expand All @@ -131,7 +131,7 @@ public void testResourcesWebInfClasses() throws Exception {
public void testResourcesAbsoluteOrdering() throws Exception {
Tomcat tomcat = getTomcatInstance();

File appDir = new File("test/webapp-3.0-fragments");
File appDir = new File("test/webapp-fragments");
// app dir is relative to server home
StandardContext ctx = (StandardContext) tomcat.addWebapp(null, "/test",
appDir.getAbsolutePath());
Expand Down Expand Up @@ -201,7 +201,7 @@ protected WebXml createWebXml() {
public void testResources2() throws Exception {
Tomcat tomcat = getTomcatInstance();

File appDir = new File("test/webapp-3.0-fragments");
File appDir = new File("test/webapp-fragments");
// app dir is relative to server home
StandardContext ctx = (StandardContext) tomcat.addWebapp(null, "/test",
appDir.getAbsolutePath());
Expand Down
8 changes: 4 additions & 4 deletions test/org/apache/catalina/core/TestStandardWrapper.java
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ public void testSecurityAnnotationsWebXmlPriority() throws Exception {
// Setup Tomcat instance
Tomcat tomcat = getTomcatInstance();

File appDir = new File("test/webapp-3.0-fragments");
File appDir = new File("test/webapp-fragments");
tomcat.addWebapp(null, "", appDir.getAbsolutePath());

tomcat.start();
Expand All @@ -122,7 +122,7 @@ public void testSecurityAnnotationsMetaDataPriority() throws Exception {
// Setup Tomcat instance
Tomcat tomcat = getTomcatInstance();

File appDir = new File("test/webapp-3.0");
File appDir = new File("test/webapp");
tomcat.addWebapp(null, "", appDir.getAbsolutePath());

tomcat.start();
Expand Down Expand Up @@ -152,7 +152,7 @@ public void testSecurityAnnotationsNoWebXmlConstraints() throws Exception {
// Setup Tomcat instance
Tomcat tomcat = getTomcatInstance();

File appDir = new File("test/webapp-3.0-servletsecurity");
File appDir = new File("test/webapp-servletsecurity");
tomcat.addWebapp(null, "", appDir.getAbsolutePath());

tomcat.start();
Expand All @@ -171,7 +171,7 @@ public void testSecurityAnnotationsNoWebXmlLoginConfig() throws Exception {
// Setup Tomcat instance
Tomcat tomcat = getTomcatInstance();

File appDir = new File("test/webapp-3.0-servletsecurity2");
File appDir = new File("test/webapp-servletsecurity2");
tomcat.addWebapp(null, "", appDir.getAbsolutePath());

tomcat.start();
Expand Down
34 changes: 17 additions & 17 deletions test/org/apache/catalina/loader/TestVirtualContext.java
Original file line number Diff line number Diff line change
Expand Up @@ -62,20 +62,20 @@ public void setUp() throws Exception {
public void testVirtualClassLoader() throws Exception {
Tomcat tomcat = getTomcatInstance();

File appDir = new File("test/webapp-3.0-virtual-webapp/src/main/webapp");
File appDir = new File("test/webapp-virtual-webapp/src/main/webapp");
// app dir is relative to server home
StandardContext ctx = (StandardContext) tomcat.addWebapp(null, "/test",
appDir.getAbsolutePath());

ctx.setResources(new StandardRoot(ctx));
File f1 = new File("test/webapp-3.0-virtual-webapp/target/classes");
File f2 = new File("test/webapp-3.0-virtual-library/target/classes");
File f1 = new File("test/webapp-virtual-webapp/target/classes");
File f2 = new File("test/webapp-virtual-library/target/classes");
File f3 = new File(
"test/webapp-3.0-virtual-webapp/src/main/webapp/WEB-INF/classes");
"test/webapp-virtual-webapp/src/main/webapp/WEB-INF/classes");
File f4 = new File(
"test/webapp-3.0-virtual-webapp/src/main/webapp2/WEB-INF/classes");
File f5 = new File("test/webapp-3.0-virtual-webapp/src/main/misc");
File f6 = new File("test/webapp-3.0-virtual-webapp/src/main/webapp2");
"test/webapp-virtual-webapp/src/main/webapp2/WEB-INF/classes");
File f5 = new File("test/webapp-virtual-webapp/src/main/misc");
File f6 = new File("test/webapp-virtual-webapp/src/main/webapp2");
ctx.getResources().createWebResourceSet(
WebResourceRoot.ResourceSetType.POST, f1.getAbsolutePath(),
"/WEB-INF/classes", "/");
Expand Down Expand Up @@ -147,19 +147,19 @@ public void testVirtualClassLoader() throws Exception {
"/test/classpathGetResources.jsp?path=rsrc/").toString();
assertTrue(
allUrls,
allUrls.indexOf("/test/webapp-3.0-virtual-webapp/src/main/webapp/WEB-INF/classes/rsrc") > 0);
allUrls.indexOf("/test/webapp-virtual-webapp/src/main/webapp/WEB-INF/classes/rsrc") > 0);
assertTrue(
allUrls,
allUrls.indexOf("/test/webapp-3.0-virtual-webapp/src/main/webapp2/WEB-INF/classes/rsrc") > 0);
allUrls.indexOf("/test/webapp-virtual-webapp/src/main/webapp2/WEB-INF/classes/rsrc") > 0);
assertTrue(
allUrls,
allUrls.indexOf("/test/webapp-3.0-virtual-webapp/src/main/webapp/WEB-INF/lib/rsrc.jar!/rsrc") > 0);
allUrls.indexOf("/test/webapp-virtual-webapp/src/main/webapp/WEB-INF/lib/rsrc.jar!/rsrc") > 0);
assertTrue(
allUrls,
allUrls.indexOf("/test/webapp-3.0-virtual-webapp/target/classes/rsrc") > 0);
allUrls.indexOf("/test/webapp-virtual-webapp/target/classes/rsrc") > 0);
assertTrue(
allUrls,
allUrls.indexOf("/test/webapp-3.0-virtual-library/target/classes/rsrc") > 0);
allUrls.indexOf("/test/webapp-virtual-library/target/classes/rsrc") > 0);

// check that there's no duplicate in the URLs
String[] allUrlsArray = allUrls.split("\\s+");
Expand All @@ -172,7 +172,7 @@ public void testVirtualClassLoader() throws Exception {
"/test/classpathGetResources.jsp?path=rsrc2/").toString();
assertTrue(
allRsrsc2ClasspathUrls,
allRsrsc2ClasspathUrls.indexOf("/test/webapp-3.0-virtual-webapp/src/main/webapp2/WEB-INF/classes/rsrc2") > 0);
allRsrsc2ClasspathUrls.indexOf("/test/webapp-virtual-webapp/src/main/webapp2/WEB-INF/classes/rsrc2") > 0);

// tests context.getRealPath

Expand All @@ -184,7 +184,7 @@ public void testVirtualClassLoader() throws Exception {
// Real paths depend on the OS and this test has to work on all
// platforms so use File to convert the path to a platform specific form
File f = new File(
"test/webapp-3.0-virtual-webapp/src/main/webapp/rsrc/resourceF.properties");
"test/webapp-virtual-webapp/src/main/webapp/rsrc/resourceF.properties");
assertPageContains(
"/test/contextGetRealPath.jsp?path=/rsrc/resourceF.properties",
f.getPath());
Expand Down Expand Up @@ -254,7 +254,7 @@ public void testVirtualClassLoader() throws Exception {
public void testAdditionalWebInfClassesPaths() throws Exception {
Tomcat tomcat = getTomcatInstance();

File appDir = new File("test/webapp-3.0-virtual-webapp/src/main/webapp");
File appDir = new File("test/webapp-virtual-webapp/src/main/webapp");
// app dir is relative to server home
StandardContext ctx = (StandardContext) tomcat.addWebapp(null, "/test",
appDir.getAbsolutePath());
Expand All @@ -277,8 +277,8 @@ public void testAdditionalWebInfClassesPaths() throws Exception {
annotatedServletClassOutputStream.close();

ctx.setResources(new StandardRoot(ctx));
File f1 = new File("test/webapp-3.0-virtual-webapp/target/classes");
File f2 = new File("test/webapp-3.0-virtual-library/target/classes");
File f1 = new File("test/webapp-virtual-webapp/target/classes");
File f2 = new File("test/webapp-virtual-library/target/classes");
ctx.getResources().createWebResourceSet(
WebResourceRoot.ResourceSetType.POST, f1.getAbsolutePath(),
"/WEB-INF/classes", "/");
Expand Down
4 changes: 2 additions & 2 deletions test/org/apache/catalina/loader/TestVirtualWebappLoader.java
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public void testModified() throws Exception {
@Test
public void testStartInternal() throws Exception {
Tomcat tomcat = getTomcatInstance();
File appDir = new File("test/webapp-3.0");
File appDir = new File("test/webapp");
// Must have a real docBase - just use temp
StandardContext ctx =
(StandardContext)tomcat.addContext("", appDir.getAbsolutePath());
Expand All @@ -56,7 +56,7 @@ public void testStartInternal() throws Exception {
ctx.setResources(new StandardRoot(ctx));
ctx.resourcesStart();

File f1 = new File("test/webapp-3.0-fragments/WEB-INF/lib");
File f1 = new File("test/webapp-fragments/WEB-INF/lib");
ctx.getResources().createWebResourceSet(
WebResourceRoot.ResourceSetType.POST, f1.getAbsolutePath(),
"/WEB-INF/lib", "/");
Expand Down
4 changes: 2 additions & 2 deletions test/org/apache/catalina/mapper/TestMapperWelcomeFiles.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public void testWelcomeFileNotStrict() throws Exception {

Tomcat tomcat = getTomcatInstance();

File appDir = new File("test/webapp-3.0");
File appDir = new File("test/webapp");

StandardContext ctxt = (StandardContext) tomcat.addWebapp(null, "/test",
appDir.getAbsolutePath());
Expand Down Expand Up @@ -67,7 +67,7 @@ public void testWelcomeFileStrict() throws Exception {

Tomcat tomcat = getTomcatInstance();

File appDir = new File("test/webapp-3.0");
File appDir = new File("test/webapp");

StandardContext ctxt = (StandardContext) tomcat.addWebapp(null, "/test",
appDir.getAbsolutePath());
Expand Down
12 changes: 6 additions & 6 deletions test/org/apache/catalina/startup/TestContextConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ private void doTestOverrideDefaultServletWithSCI(String servletName)

Tomcat tomcat = getTomcatInstance();

File appDir = new File("test/webapp-3.0");
File appDir = new File("test/webapp");
StandardContext ctxt = (StandardContext) tomcat.addContext(null,
"/test", appDir.getAbsolutePath());
ctxt.setDefaultWebXml(new File("conf/web.xml").getAbsolutePath());
Expand All @@ -71,7 +71,7 @@ private void doTestOverrideDefaultServletWithSCI(String servletName)
public void testBug51396() throws Exception {
Tomcat tomcat = getTomcatInstance();

File appDir = new File("test/webapp-3.0-fragments");
File appDir = new File("test/webapp-fragments");
// app dir is relative to server home
tomcat.addWebapp(null, "/test", appDir.getAbsolutePath());

Expand All @@ -84,7 +84,7 @@ public void testBug51396() throws Exception {
public void testBug53574() throws Exception {
Tomcat tomcat = getTomcatInstance();

File appDir = new File("test/webapp-3.0");
File appDir = new File("test/webapp");
tomcat.addWebapp(null, "/test", appDir.getAbsolutePath());

tomcat.start();
Expand All @@ -96,7 +96,7 @@ public void testBug53574() throws Exception {
public void testBug54262() throws Exception {
Tomcat tomcat = getTomcatInstance();

File appDir = new File("test/webapp-3.0-fragments-empty-absolute-ordering");
File appDir = new File("test/webapp-fragments-empty-absolute-ordering");
tomcat.addWebapp(null, "/test", appDir.getAbsolutePath());

tomcat.start();
Expand All @@ -111,7 +111,7 @@ public void testBug54262() throws Exception {
public void testBug54379() throws Exception {
Tomcat tomcat = getTomcatInstance();

File appDir = new File("test/webapp-3.0-fragments");
File appDir = new File("test/webapp-fragments");
Context context =
tomcat.addWebapp(null, "/test", appDir.getAbsolutePath());

Expand All @@ -130,7 +130,7 @@ public void testBug54379() throws Exception {
public void testBug54448and54450() throws Exception {
Tomcat tomcat = getTomcatInstance();

File appDir = new File("test/webapp-3.0-fragments");
File appDir = new File("test/webapp-fragments");
Context context = tomcat.addWebapp(null, "/test",
appDir.getAbsolutePath());

Expand Down
Loading

0 comments on commit c40e1ee

Please sign in to comment.