我在jboss里做页面过滤器时出现错误

04-11-03 Jaffa

我在jboss里做页面过滤器出现错误.请高手帮忙.

------------

web.xml里配置

<filter>

<filter-name>websfilter</filter-name>

<filter-class>filter.dxsq.WebsFilter</filter-class>

</filter>

<filter-mapping>

<filter-name>websfilter</filter-name>

<url-pattern>*.jsp</url-pattern>

</filter-mapping>

<filter-mapping>

<filter-name>websfilter</filter-name>

<url-pattern>*.html</url-pattern>

</filter-mapping>

<filter-mapping>

<filter-name>websfilter</filter-name>

<url-pattern>*.htm</url-pattern>

</filter-mapping>

----------------------------------

jboss启动时出现下面错误:

14:09:05,022 ERROR [Digester] Parse Error at line 28 column -1: 组件“web-app”

在此不允许“filter”。

org.xml.sax.SAXParseException: 组件“web-app”在此不允许“filter”。

at org.apache.crimson.parser.Parser2.error(Parser2.java:3160)

at org.apache.crimson.parser.ValidatingParser$ChildrenValidator.consume(

ValidatingParser.java:349)

at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1317)

at org.apache.crimson.parser.Parser2.content(Parser2.java:1779)

at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1507)

at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:500)

at org.apache.crimson.parser.Parser2.parse(Parser2.java:305)

at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:442)

at org.apache.commons.digester.Digester.parse(Digester.java:1543)

at org.apache.catalina.startup.ContextConfig.applicationConfig(ContextCo

nfig.java:282)

at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:63

9)

at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfi

g.java:243)

at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(Lifecycl

eSupport.java:166)

at org.apache.catalina.core.StandardContext.start(StandardContext.java:3

567)

at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase

.java:821)

at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:80

7)

at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:579)

at org.jboss.web.catalina.EmbeddedCatalinaService41.createWebContext(Emb

eddedCatalinaService41.java:432)

at org.jboss.web.catalina.EmbeddedCatalinaService41.performDeploy(Embedd

edCatalinaService41.java:306)

at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:30

1)

at org.jboss.deployment.MainDeployer.start(MainDeployer.java:814)

at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:627)

at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:591)

at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces

sorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:324)

at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea

nDispatcher.java:284)

at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)

at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)

at $Proxy3.deploy(Unknown Source)

at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymen

tScanner.java:435)

at org.jboss.deployment.scanner.URLDeploymentScanner.scanDirectory(URLDe

ploymentScanner.java:656)

at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentS

canner.java:507)

at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(A

bstractDeploymentScanner.java:266)

at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:1

65)

at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces

sorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:324)

at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea

nDispatcher.java:284)

at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)

at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceControl

ler.java:1003)

at $Proxy0.start(Unknown Source)

at org.jboss.system.ServiceController.start(ServiceController.java:413)

at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces

sorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:324)

at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea

nDispatcher.java:284)

at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)

at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)

at $Proxy2.start(Unknown Source)

at org.jboss.deployment.SARDeployer.start(SARDeployer.java:232)

at org.jboss.deployment.MainDeployer.start(MainDeployer.java:814)

at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:627)

at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:591)

at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:575)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.

java:39)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces

sorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:324)

at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea

nDispatcher.java:284)

at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)

at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:324)

at org.jboss.system.server.ServerImpl.start(ServerImpl.java:221)

at org.jboss.Main.boot(Main.java:148)

at org.jboss.Main$1.run(Main.java:381)

at java.lang.Thread.run(Thread.java:536)

banq
2004-11-08 11:14

web.xml的filter参数设置不正确。