protected static ApplicationContext createContext(String name, ApplicationContext parent) {
return new XmlApplicationContext(new FileSystemResource(new File(srcdir, name)), parent);
}
protected static void prepareServlet() throws Exception {
ServletRunner servletRunner = new ServletRunner();
servletRunner.registerServlet("/app1/*", MyServlet.class.getName());
client = servletRunner.newClient();
client.setExceptionsThrownOnErrorStatus(false);
client.getClientProperties().setAutoRedirect(false);
MyServlet servlet = (MyServlet) client.newInvocation("http://www.taobao.com/app1").getServlet();
assertNotNull(servlet);