tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gary Zhu" <g...@timeicr.com>
Subject should <error-page/> work on Tomcat 4.1.30?
Date Mon, 26 Jul 2004 13:35:47 GMT

Hi, 

I am trying to setup <error-page> for my servlet applications, here is what I did (In
snippets): 
<?xml version="1.0" encoding="ISO-8859-1"?>

<!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>
	<!-- ERROR MAPPINGS -->
	<error-page>
		<error-code>404</error-code>
		<location>/error.html</location>
	</error-page>
   .....
</web-app>

Below is the error message I got from Tomcat AppServer:
SEVERE: Parse Error at line 164 column 11: The content of element type "web-app" must match
"(icon?,display-name?,description?,distributable?,context-param*,filter*,filter-mapping*,listener*,servlet*,servlet-mapping*,session-config?,mime-mapping*,welcome-file-list?,error-page*,taglib*,resource-env-ref*,resource-ref*,security-constraint*,login-config?,security-role*,env-entry*,ejb-ref*,ejb-local-ref*)".
org.xml.sax.SAXParseException: The content of element type "web-app" must match "(icon?,display-name?,description?,distributable?,context-param*,filter*,filter-mapping*,listener*,servlet*,servlet-mapping*,session-config?,mime-mapping*,welcome-file-list?,error-page*,taglib*,resource-env-ref*,resource-ref*,security-constraint*,login-config?,security-role*,env-entry*,ejb-ref*,ejb-local-ref*)".
	at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:232)
	at org.apache.xerces.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:173)
	at org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:362)
	at org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:296)
	at org.apache.xerces.impl.dtd.XMLDTDValidator.handleEndElement(XMLDTDValidator.java:1953)
	at org.apache.xerces.impl.dtd.XMLDTDValidator.endElement(XMLDTDValidator.java:878)
	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.handleEndElement(XMLDocumentFragmentScannerImpl.java:1144)
	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XMLDocumentFragmentScannerImpl.java:987)
	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1445)
	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:333)
	at org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:524)
	at org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:580)
	at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:152)
	at org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1169)
	at org.apache.commons.digester.Digester.parse(Digester.java:1495)
	at org.apache.catalina.startup.ContextConfig.applicationConfig(ContextConfig.java:282)
	at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:639)
	at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:243)
	at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:166)
	at org.apache.catalina.core.StandardContext.start(StandardContext.java:3493)
	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:821)
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807)
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:579)
	at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:257)
	at org.apache.catalina.core.StandardHost.install(StandardHost.java:772)
	at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:569)
	at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:411)
	at org.apache.catalina.startup.HostConfig.start(HostConfig.java:879)
	at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:368)
	at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:166)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1196)
	at org.apache.catalina.core.StandardHost.start(StandardHost.java:738)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)
	at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:347)
	at org.apache.catalina.core.StandardService.start(StandardService.java:497)
	at org.apache.catalina.core.StandardServer.start(StandardServer.java:2189)
	at org.apache.catalina.startup.CatalinaService.start(CatalinaService.java:271)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:324)
	at org.apache.catalina.startup.BootstrapService.start(BootstrapService.java:245)
	at org.apache.catalina.startup.BootstrapService.main(BootstrapService.java:307)

Any idea? Thanks

Gary 


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message