Author: markt Date: Tue Oct 25 21:35:04 2011 New Revision: 1188931 URL: http://svn.apache.org/viewvc?rev=1188931&view=rev Log: Remove unnecessary code
Modified: tomcat/trunk/test/org/apache/tomcat/util/http/mapper/TestMapperWelcomeFiles.java Modified: tomcat/trunk/test/org/apache/tomcat/util/http/mapper/TestMapperWelcomeFiles.java URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/tomcat/util/http/mapper/TestMapperWelcomeFiles.java?rev=1188931&r1=1188930&r2=1188931&view=diff ============================================================================== --- tomcat/trunk/test/org/apache/tomcat/util/http/mapper/TestMapperWelcomeFiles.java (original) +++ tomcat/trunk/test/org/apache/tomcat/util/http/mapper/TestMapperWelcomeFiles.java Tue Oct 25 21:35:04 2011 @@ -17,13 +17,9 @@ package org.apache.tomcat.util.http.mapper; import java.io.File; -import java.io.IOException; import java.util.HashMap; import java.util.List; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import static org.junit.Assert.assertEquals; @@ -47,9 +43,9 @@ public class TestMapperWelcomeFiles exte StandardContext ctxt = (StandardContext) tomcat.addWebapp(null, "/test", appDir.getAbsolutePath()); - Tomcat.addServlet(ctxt, "Ok", new OkServlet()); ctxt.setReplaceWelcomeFiles(true); ctxt.addWelcomeFile("index.jsp"); + // Mapping for *.do is define in web.xml ctxt.addWelcomeFile("index.do"); tomcat.start(); @@ -75,9 +71,9 @@ public class TestMapperWelcomeFiles exte StandardContext ctxt = (StandardContext) tomcat.addWebapp(null, "/test", appDir.getAbsolutePath()); - Tomcat.addServlet(ctxt, "Ok", new OkServlet()); ctxt.setReplaceWelcomeFiles(true); ctxt.addWelcomeFile("index.jsp"); + // Mapping for *.do is define in web.xml ctxt.addWelcomeFile("index.do"); // Simulate STRICT_SERVLET_COMPLIANCE @@ -95,16 +91,4 @@ public class TestMapperWelcomeFiles exte new HashMap<String,List<String>>()); assertEquals(HttpServletResponse.SC_NOT_FOUND, rc); } - - private static class OkServlet extends HttpServlet { - - private static final long serialVersionUID = 1L; - - @Override - protected void doGet(HttpServletRequest req, HttpServletResponse resp) - throws ServletException, IOException { - resp.setContentType("text/plain"); - resp.getWriter().write("OK-Servlet"); - } - } } --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org