Lift 不喜欢我的 Web.xml
我在 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。
有什么想法吗?
I am having trouble with a basic hello world lift application from working under tomcat 6.0.18. My web.xml looks like this
<?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>
But when I start up the app, I get
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
Which leads me to believe it doesn't like my web.xml.
Any ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
默认 web.xml(在conf目录中)似乎丢失了,当然,如果它位于WEB-INF文件夹中,您的web.xml应该没问题。
The default web.xml (in the conf directory) seems to be missing, you web.xml should be OK providing it's in the WEB-INF folder of course.
我认为它是说它无法找到您的
web.xml
文件。你的WAR文件展开时是否在以下位置?I think it is saying that it cannot find your
web.xml
file. Is it in the following location when your WAR file is expanded?