我在使用tomcat 6.0.18时无法使用基本的hello world lift应用程序。我的web.xml看起来像这样
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<filter>
<filter-name>LiftFilter</filter-name>
<display-name>Lift Filter</display-name>
<description>The Filter that intercepts lift calls</description>
<filter-class>net.liftweb.http.LiftFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>LiftFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
</web-app>
但是当我启动应用程序时,
INFO: Starting service Catalina Jan 18, 2011 7:42:44 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.18 Jan 18, 2011 7:42:44 PM org.apache.catalina.startup.ContextConfig defaultWebConfig
INFO: No default web.xml
Jan 18, 2011 7:42:45 PM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-9981 Jan 18, 2011 7:42:45 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 1275 ms
这使我相信它不喜欢我的web.xml。
有任何想法吗?
最佳答案
默认的web.xml(在conf目录中)似乎丢失了,您的web.xml应该可以,只要它在WEB-INF文件夹中即可。