0
votes

I know that I followed the specification for servlet-mapping and I also created the servlet using Netbeans 7.0.

Here is my web.xml

<servlet>
  <servlet-name>Selection</servlet-name>
  <servlet-class>com.package.sample.Selection</servlet-class>
</servlet>  
<servlet-mapping>
  <servlet-name>Selection</servlet-name>
  <url-patern>/Selection</url-patern>
</servlet-mapping>

On catalina log Files

SEVERE: Error deploying web application directory client java.lang.IllegalArgumentException: Invalid null in servlet mapping at org.apache.catalina.core.StandardContext.addServletMapping(StandardContext.java:3155) at org.apache.catalina.core.StandardContext.addServletMapping(StandardContext.java:3130) at org.apache.catalina.deploy.WebXml.configureContext(WebXml.java:1301) at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1350) at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:881) at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:316) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:89) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5103) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:812) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:787) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:607) at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1055) at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:978) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:472) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1322) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:89) at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:379) at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:324) at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1041) at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:774) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145) at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1033) at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:291) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145) at org.apache.catalina.core.StandardService.startInternal(StandardService.java:443) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145) at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:727) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145) at org.apache.catalina.startup.Catalina.start(Catalina.java:620) 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:597) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:303) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:431) 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:597) at org.tanukisoftware.wrapper.WrapperStartStopApp.run(WrapperStartStopApp.java:264) at java.lang.Thread.run(Thread.java:662)

1
my school taught me the spelling of pattern having a double t. <url-pattern>/Selection</url-pattern>Uma Kanth

1 Answers

1
votes

The spelling of pattern is wrong in the xml file.

<servlet>
  <servlet-name>Selection</servlet-name>
  <servlet-class>com.package.sample.Selection</servlet-class>
</servlet>  
<servlet-mapping>
  <servlet-name>Selection</servlet-name>
  <url-pattern>/Selection</url-pattern>
</servlet-mapping>