我检查了所有其他与url模式相关的问题,但是它们不能解决我的问题。所以这里是:
我在web.xml中有如下定义:
<filter-mapping>
<filter-name>ManageFilter</filter-name>
<url-pattern>/jsp/*.do</url-pattern>
</filter-mapping>
启动时引发异常。说:
Invalid <url-pattern> /jsp/* in filter mapping
我尝试了以下不同版本:
<url-pattern>jsp/*.do</url-pattern>
但是它不起作用。出现相同的错误。
我如何使其起作用?还是此url模式的工作版本是什么?
谢谢。
完整的异常消息:
15:32:52,179 ERROR [org.apache.catalina.core] (ServerService Thread Pool -- 81) JBWEB001097: Error starting context /E_LifePensionWeb: java.lang.IllegalArgumentException: JBWEB000278: Invalid <url-pattern> /jsp/*.do in filter mapping
at org.apache.catalina.core.StandardContext.validateFilterMap(StandardContext.java:2030) [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]
at org.apache.catalina.core.StandardContext.addFilterMap(StandardContext.java:1972) [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]
at org.jboss.as.web.deployment.JBossContextConfig.processWebMetaData(JBossContextConfig.java:413) [jboss-as-web-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]
at org.jboss.as.web.deployment.JBossContextConfig.applicationWebConfig(JBossContextConfig.java:267) [jboss-as-web-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]
at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:369) [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]
at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:162) [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]
at org.jboss.as.web.deployment.JBossContextConfig.lifecycleEvent(JBossContextConfig.java:260) [jboss-as-web-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:115) [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]
at org.apache.catalina.core.StandardContext.start(StandardContext.java:3720) [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]
at org.jboss.as.web.deployment.WebDeploymentService.doStart(WebDeploymentService.java:163) [jboss-as-web-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]
at org.jboss.as.web.deployment.WebDeploymentService.access$000(WebDeploymentService.java:61) [jboss-as-web-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]
at org.jboss.as.web.deployment.WebDeploymentService$1.run(WebDeploymentService.java:96) [jboss-as-web-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [rt.jar:1.7.0_80]
at java.util.concurrent.FutureTask.run(FutureTask.java:262) [rt.jar:1.7.0_80]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_80]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_80]
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_80]
at org.jboss.threads.JBossThread.run(JBossThread.java:122)
答案 0 :(得分:0)
问题通过在web.xml中分别提供所有.do路径来解决
谢谢