NutzCN Logo
问答 web.xml配置出错
发布于 2545天前 作者 蛋蛋的忧伤 1850 次浏览 复制 上一个帖子 下一个帖子
标签:
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
         version="3.1">

  <!-- Nutz -->
  <filter>
    <filter-name>nutz</filter-name>   //这一行有错误
    <filter-class>org.nutz.mvc.NutFilter</filter-class>
    <init-param>
      <param-name>modules</param-name>
      <param-value>com.dd.MainModule</param-value>
    </init-param>
  </filter>


  <filter-mapping>
    <filter-name>nutz</filter-name>
    <url-pattern>/*</url-pattern>
    <dispatcher>REQUEST</dispatcher>
    <dispatcher>FORWARD</dispatcher>
  </filter-mapping>


  <welcome-file-list>
    <welcome-file>/index.html</welcome-file>
  </welcome-file-list>


</web-app>

标签报:Filter should have a mapping .....
我明明有映射标签啊,但是为啥就说我没有呢???

4 回复

就是启动出错我才找web.xml的....

D:\Dev\apache-tomcat-8.0.44\bin\catalina.bat run
[2017-11-27 05:01:30,201] Artifact LuliChat:Web exploded: Waiting for server connection to start artifact deployment...
Using CATALINA_BASE:   "C:\Users\Administrator\.IntelliJIdea2017.2\system\tomcat\Unnamed_LuliChat_2"
Using CATALINA_HOME:   "D:\Dev\apache-tomcat-8.0.44"
Using CATALINA_TMPDIR: "D:\Dev\apache-tomcat-8.0.44\temp"
Using JRE_HOME:        "C:\Program Files\Java\jdk1.8.0_151"
Using CLASSPATH:       "D:\Dev\apache-tomcat-8.0.44\bin\bootstrap.jar;D:\Dev\apache-tomcat-8.0.44\bin\tomcat-juli.jar"
Connected to the target VM, address: '127.0.0.1:56243', transport: 'socket'
27-Nov-2017 17:01:31.087 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Server version:        Apache Tomcat/8.0.44
27-Nov-2017 17:01:31.090 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Server built:          May 10 2017 17:21:09 UTC
27-Nov-2017 17:01:31.090 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Server number:         8.0.44.0
27-Nov-2017 17:01:31.090 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name:               Windows 7
27-Nov-2017 17:01:31.090 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version:            6.1
27-Nov-2017 17:01:31.091 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture:          amd64
27-Nov-2017 17:01:31.091 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home:             C:\Program Files\Java\jdk1.8.0_151\jre
27-Nov-2017 17:01:31.091 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version:           1.8.0_151-b12
27-Nov-2017 17:01:31.091 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor:            Oracle Corporation
27-Nov-2017 17:01:31.091 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE:         C:\Users\Administrator\.IntelliJIdea2017.2\system\tomcat\Unnamed_LuliChat_2
27-Nov-2017 17:01:31.091 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME:         D:\Dev\apache-tomcat-8.0.44
27-Nov-2017 17:01:31.092 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=C:\Users\Administrator\.IntelliJIdea2017.2\system\tomcat\Unnamed_LuliChat_2\conf\logging.properties
27-Nov-2017 17:01:31.092 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
27-Nov-2017 17:01:31.092 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -agentlib:jdwp=transport=dt_socket,address=127.0.0.1:56243,suspend=y,server=n
27-Nov-2017 17:01:31.092 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dfile.encoding=UTF-8
27-Nov-2017 17:01:31.092 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote=
27-Nov-2017 17:01:31.092 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.port=1099
27-Nov-2017 17:01:31.092 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.ssl=false
27-Nov-2017 17:01:31.092 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.authenticate=false
27-Nov-2017 17:01:31.093 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.rmi.server.hostname=127.0.0.1
27-Nov-2017 17:01:31.093 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djdk.tls.ephemeralDHKeySize=2048
27-Nov-2017 17:01:31.093 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.protocol.handler.pkgs=org.apache.catalina.webresources
27-Nov-2017 17:01:31.093 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.endorsed.dirs=D:\Dev\apache-tomcat-8.0.44\endorsed
27-Nov-2017 17:01:31.093 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=C:\Users\Administrator\.IntelliJIdea2017.2\system\tomcat\Unnamed_LuliChat_2
27-Nov-2017 17:01:31.093 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=D:\Dev\apache-tomcat-8.0.44
27-Nov-2017 17:01:31.093 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=D:\Dev\apache-tomcat-8.0.44\temp
27-Nov-2017 17:01:31.094 信息 [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jdk1.8.0_151\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Java\jdk1.8.0_151\bin;D:\Dev\apache-maven-3.5.0\bin;C:\Program Files\TortoiseSVN\bin;C:\Program Files\Git\cmd;.
27-Nov-2017 17:01:31.227 信息 [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8080"]
27-Nov-2017 17:01:31.283 信息 [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
27-Nov-2017 17:01:31.286 信息 [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["ajp-nio-8009"]
27-Nov-2017 17:01:31.288 信息 [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
27-Nov-2017 17:01:31.289 信息 [main] org.apache.catalina.startup.Catalina.load Initialization processed in 523 ms
27-Nov-2017 17:01:31.335 信息 [main] org.apache.catalina.core.StandardService.startInternal Starting service Catalina
27-Nov-2017 17:01:31.336 信息 [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/8.0.44
27-Nov-2017 17:01:31.346 信息 [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8080"]
27-Nov-2017 17:01:31.360 信息 [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["ajp-nio-8009"]
27-Nov-2017 17:01:31.363 信息 [main] org.apache.catalina.startup.Catalina.start Server startup in 73 ms
Connected to server
[2017-11-27 05:01:31,830] Artifact LuliChat:Web exploded: Artifact is being deployed, please wait...
27-Nov-2017 17:01:32.239 严重 [RMI TCP Connection(3)-127.0.0.1] org.apache.catalina.core.StandardContext.startInternal One or more Filters failed to start. Full details will be found in the appropriate container log file
27-Nov-2017 17:01:32.239 严重 [RMI TCP Connection(3)-127.0.0.1] org.apache.catalina.core.StandardContext.startInternal Context [/chat] startup failed due to previous errors
[2017-11-27 05:01:32,255] Artifact LuliChat:Web exploded: Error during artifact deployment. See server log for details.

删了重新建

..........好......明天......见

添加回复
请先登陆
回到顶部