Re: Servlet mapping error
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Amber, Amber wrote: | /*.invoker As pid points out, you should use "*.whatever", not "/*.whatever". The servlet specification says that the pattern you used is not valid: " SRV.11.2 Specification of Mappings In the Web application deployment descriptor, the following syntax is used to define mappings: • A string beginning with a ‘/’ character and ending with a ‘/*’ suffix ~ is used for path mapping. • A string beginning with a ‘*.’ prefix is used as an extension mapping. • A string containing only the ’/’ character indicates the "default" ~ servlet of the application. In this case the servlet path is the ~ request URI minus the context path and the path info is null. • All other strings are used for exact matches only. " Thus, the only path that would match your would actually be the exact string "/*.invoker", which I'm guessing is not what you want. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkhYMmgACgkQ9CaO5/Lv0PD3pQCdFNmukuhfQLtnkykzVOqsTl5G 4ekAn1kujpFHkrY1kFVf7sKwF405WUW5 =5mpR -END PGP SIGNATURE- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Servlet mapping error
Try just "*.", not "/*.", as below: *.invoker p Amber wrote: I write a very simple Spring HTTP invoker service, the servlet mapping config in web.xml is : TestServlet TestServlet amber.TestServlet TestServlet /*.invoker The test application works well in Oracle OC4J, but when I deploy it to Apache Tomcat6, the following exception occurs when Tomcat starts, I also tried other patterns like /*.jss, neither works: 2008-6-14 21:36:34 org.apache.tomcat.util.digester.SetPropertiesRule begin 警告: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:test' did not find a matching property. 2008-6-14 21:36:34 org.apache.catalina.core.AprLifecycleListener init 信息: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: D:\pentaho\java\bin;.;C:\WINDOWS\system32;C:\WINDO WS;D:\pentaho\java\bin\client;D:\pentaho\java\bin; E:\Amber\Perl\site\bin;E:\Amber\Perl\bin;D:\pentah o\java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDO WS\System32\Wbem;"D:\Program Files\Zone Labs\ZoneAlarm\MailFrontier";d:\Program Files\Microsoft SQL Server\90\Tools\binn\;D:\JavaTool\Ant170\bin;D:\Pr ogram Files\gawk\bin;E:\Amber\MySQL\bin;D:\Program Files\SSH Communications Security\SSH Secure Shell 2008-6-14 21:36:34 org.apache.coyote.http11.Http11Protocol init 信息: Initializing Coyote HTTP/1.1 on http-8080 2008-6-14 21:36:34 org.apache.catalina.startup.Catalina load 信息: Initialization processed in ms 2008-6-14 21:36:34 org.apache.catalina.core.StandardService start 信息: Starting service Catalina 2008-6-14 21:36:34 org.apache.catalina.core.StandardEngine start 信息: Starting Servlet Engine: Apache Tomcat/6.0.16 2008-6-14 21:36:34 org.apache.tomcat.util.digester.Digester endElement 严重: End event threw exception java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.tomcat.util.IntrospectionUtils.callMeth odN(IntrospectionUtils.java:953) at org.apache.catalina.startup.CallMethodMultiRule.en d(WebRuleSet.java:792) at org.apache.tomcat.util.digester.Rule.end(Rule.java :229) at org.apache.tomcat.util.digester.Digester.endElemen t(Digester.java:1140) at com.sun.org.apache.xerces.internal.parsers.Abstrac tSAXParser.endElement(AbstractSAXParser.java:633) at com.sun.org.apache.xerces.internal.impl.XMLDocumen tFragmentScannerImpl.scanEndElement(XMLDocumentFra gmentScannerImpl.java:1241) at com.sun.org.apache.xerces.internal.impl.XMLDocumen tFragmentScannerImpl$FragmentContentDispatcher.dis patch(XMLDocumentFragmentScannerImpl.java:1685) at com.sun.org.apache.xerces.internal.impl.XMLDocumen tFragmentScannerImpl.scanDocument(XMLDocumentFragm entScannerImpl.java:368) at com.sun.org.apache.xerces.internal.parsers.XML11Co nfiguration.parse(XML11Configuration.java:834) at com.sun.org.apache.xerces.internal.parsers.XML11Co nfiguration.parse(XML11Configuration.java:764) at com.sun.org.apache.xerces.internal.parsers.XMLPars er.parse(XMLParser.java:148) at com.sun.org.apache.xerces.internal.parsers.Abstrac tSAXParser.parse(AbstractSAXParser.java:1242) at org.apache.tomcat.util.digester.Digester.parse(Dig ester.java:1644) at org.apache.catalina.startup.ContextConfig.applicat ionWebConfig(ContextConfig.java:369) at org.apache.catalina.startup.ContextConfig.start(Co ntextConfig.java:1062) at org.apache.catalina.startup.ContextConfig.lifecycl eEvent(ContextConfig.java:261) at org.apache.catalina.util.LifecycleSupport.fireLife cycleEvent(LifecycleSupport.java:117) at org.apache.catalina.core.StandardContext.start(Sta ndardContext.java:4252) at org.apache.catalina.core.ContainerBase.start(Conta inerBase.java:1045) at org.apache.catalina.core.StandardHost.start(Standa rdHost.java:719) at org.apache.catalina.core.ContainerBase.start(Conta inerBase.java:1045) at org.apache.catalina.core.StandardEngine.start(Stan dardEngine.java:443) at org.apache.catalina.core.StandardService.start(Sta ndardService.java:516) at org.apache.catalina.core.StandardServer.start(Stan dardServer.java:710) at org.apache.catalina.startup.Catalina.start(Catalin a.java:578) at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.catalina.startup.Bootstrap.start(Bootst rap.java:288) at org.apache.catalina.startup.Bootstrap.main(Bootstr ap.java:413) Caused by: java.lang.IllegalArgumentException: Invalid /*.invoker in servlet mapping at org.apache.catalina.core.StandardContext.addServle tMapping(StandardContext.java:2397
Servlet mapping error
I write a very simple Spring HTTP invoker service, the servlet mapping config in web.xml is : TestServlet TestServlet amber.TestServlet TestServlet /*.invoker The test application works well in Oracle OC4J, but when I deploy it to Apache Tomcat6, the following exception occurs when Tomcat starts, I also tried other patterns like /*.jss, neither works: 2008-6-14 21:36:34 org.apache.tomcat.util.digester.SetPropertiesRule begin 警告: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:test' did not find a matching property. 2008-6-14 21:36:34 org.apache.catalina.core.AprLifecycleListener init 信息: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: D:\pentaho\java\bin;.;C:\WINDOWS\system32;C:\WINDO WS;D:\pentaho\java\bin\client;D:\pentaho\java\bin; E:\Amber\Perl\site\bin;E:\Amber\Perl\bin;D:\pentah o\java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDO WS\System32\Wbem;"D:\Program Files\Zone Labs\ZoneAlarm\MailFrontier";d:\Program Files\Microsoft SQL Server\90\Tools\binn\;D:\JavaTool\Ant170\bin;D:\Pr ogram Files\gawk\bin;E:\Amber\MySQL\bin;D:\Program Files\SSH Communications Security\SSH Secure Shell 2008-6-14 21:36:34 org.apache.coyote.http11.Http11Protocol init 信息: Initializing Coyote HTTP/1.1 on http-8080 2008-6-14 21:36:34 org.apache.catalina.startup.Catalina load 信息: Initialization processed in ms 2008-6-14 21:36:34 org.apache.catalina.core.StandardService start 信息: Starting service Catalina 2008-6-14 21:36:34 org.apache.catalina.core.StandardEngine start 信息: Starting Servlet Engine: Apache Tomcat/6.0.16 2008-6-14 21:36:34 org.apache.tomcat.util.digester.Digester endElement 严重: End event threw exception java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.tomcat.util.IntrospectionUtils.callMeth odN(IntrospectionUtils.java:953) at org.apache.catalina.startup.CallMethodMultiRule.en d(WebRuleSet.java:792) at org.apache.tomcat.util.digester.Rule.end(Rule.java :229) at org.apache.tomcat.util.digester.Digester.endElemen t(Digester.java:1140) at com.sun.org.apache.xerces.internal.parsers.Abstrac tSAXParser.endElement(AbstractSAXParser.java:633) at com.sun.org.apache.xerces.internal.impl.XMLDocumen tFragmentScannerImpl.scanEndElement(XMLDocumentFra gmentScannerImpl.java:1241) at com.sun.org.apache.xerces.internal.impl.XMLDocumen tFragmentScannerImpl$FragmentContentDispatcher.dis patch(XMLDocumentFragmentScannerImpl.java:1685) at com.sun.org.apache.xerces.internal.impl.XMLDocumen tFragmentScannerImpl.scanDocument(XMLDocumentFragm entScannerImpl.java:368) at com.sun.org.apache.xerces.internal.parsers.XML11Co nfiguration.parse(XML11Configuration.java:834) at com.sun.org.apache.xerces.internal.parsers.XML11Co nfiguration.parse(XML11Configuration.java:764) at com.sun.org.apache.xerces.internal.parsers.XMLPars er.parse(XMLParser.java:148) at com.sun.org.apache.xerces.internal.parsers.Abstrac tSAXParser.parse(AbstractSAXParser.java:1242) at org.apache.tomcat.util.digester.Digester.parse(Dig ester.java:1644) at org.apache.catalina.startup.ContextConfig.applicat ionWebConfig(ContextConfig.java:369) at org.apache.catalina.startup.ContextConfig.start(Co ntextConfig.java:1062) at org.apache.catalina.startup.ContextConfig.lifecycl eEvent(ContextConfig.java:261) at org.apache.catalina.util.LifecycleSupport.fireLife cycleEvent(LifecycleSupport.java:117) at org.apache.catalina.core.StandardContext.start(Sta ndardContext.java:4252) at org.apache.catalina.core.ContainerBase.start(Conta inerBase.java:1045) at org.apache.catalina.core.StandardHost.start(Standa rdHost.java:719) at org.apache.catalina.core.ContainerBase.start(Conta inerBase.java:1045) at org.apache.catalina.core.StandardEngine.start(Stan dardEngine.java:443) at org.apache.catalina.core.StandardService.start(Sta ndardService.java:516) at org.apache.catalina.core.StandardServer.start(Stan dardServer.java:710) at org.apache.catalina.startup.Catalina.start(Catalin a.java:578) at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.catalina.startup.Bootstrap.start(Bootst rap.java:288) at org.apache.catalina.startup.Bootstrap.main(Bootstr ap.java:413) Caused by: java.lang.IllegalArgumentException: Invalid /*.invoker in servlet mapping at org.apache.catalina.core.StandardContext.addServle tMapping(StandardContext.java:2397) at org.apache.catalina.core.StandardContext.addServle tMapping(Sta