java - Invalid <url-pattern> null in servlet mapping in Tomcat 7 -


i know followed specification servlet-mapping , created servlet using netbeans 7.0.

here 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 @ org.apache.catalina.core.standardcontext.addservletmapping(standardcontext.java:3155) @ org.apache.catalina.core.standardcontext.addservletmapping(standardcontext.java:3130) @ org.apache.catalina.deploy.webxml.configurecontext(webxml.java:1301) @ org.apache.catalina.startup.contextconfig.webconfig(contextconfig.java:1350) @ org.apache.catalina.startup.contextconfig.configurestart(contextconfig.java:881) @ org.apache.catalina.startup.contextconfig.lifecycleevent(contextconfig.java:316) @ org.apache.catalina.util.lifecyclesupport.firelifecycleevent(lifecyclesupport.java:119) @ org.apache.catalina.util.lifecyclebase.firelifecycleevent(lifecyclebase.java:89) @ org.apache.catalina.core.standardcontext.startinternal(standardcontext.java:5103) @ org.apache.catalina.util.lifecyclebase.start(lifecyclebase.java:145) @ org.apache.catalina.core.containerbase.addchildinternal(containerbase.java:812) @ org.apache.catalina.core.containerbase.addchild(containerbase.java:787) @ org.apache.catalina.core.standardhost.addchild(standardhost.java:607) @ org.apache.catalina.startup.hostconfig.deploydirectory(hostconfig.java:1055) @ org.apache.catalina.startup.hostconfig.deploydirectories(hostconfig.java:978) @ org.apache.catalina.startup.hostconfig.deployapps(hostconfig.java:472) @ org.apache.catalina.startup.hostconfig.start(hostconfig.java:1322) @ org.apache.catalina.startup.hostconfig.lifecycleevent(hostconfig.java:311) @ org.apache.catalina.util.lifecyclesupport.firelifecycleevent(lifecyclesupport.java:119) @ org.apache.catalina.util.lifecyclebase.firelifecycleevent(lifecyclebase.java:89) @ org.apache.catalina.util.lifecyclebase.setstateinternal(lifecyclebase.java:379) @ org.apache.catalina.util.lifecyclebase.setstate(lifecyclebase.java:324) @ org.apache.catalina.core.containerbase.startinternal(containerbase.java:1041) @ org.apache.catalina.core.standardhost.startinternal(standardhost.java:774) @ org.apache.catalina.util.lifecyclebase.start(lifecyclebase.java:145) @ org.apache.catalina.core.containerbase.startinternal(containerbase.java:1033) @ org.apache.catalina.core.standardengine.startinternal(standardengine.java:291) @ org.apache.catalina.util.lifecyclebase.start(lifecyclebase.java:145) @ org.apache.catalina.core.standardservice.startinternal(standardservice.java:443) @ org.apache.catalina.util.lifecyclebase.start(lifecyclebase.java:145) @ org.apache.catalina.core.standardserver.startinternal(standardserver.java:727) @ org.apache.catalina.util.lifecyclebase.start(lifecyclebase.java:145) @ org.apache.catalina.startup.catalina.start(catalina.java:620) @ sun.reflect.nativemethodaccessorimpl.invoke0(native method) @ sun.reflect.nativemethodaccessorimpl.invoke(nativemethodaccessorimpl.java:39) @ sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl.java:25) @ java.lang.reflect.method.invoke(method.java:597) @ org.apache.catalina.startup.bootstrap.start(bootstrap.java:303) @ org.apache.catalina.startup.bootstrap.main(bootstrap.java:431) @ sun.reflect.nativemethodaccessorimpl.invoke0(native method) @ sun.reflect.nativemethodaccessorimpl.invoke(nativemethodaccessorimpl.java:39) @ sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl.java:25) @ java.lang.reflect.method.invoke(method.java:597) @ org.tanukisoftware.wrapper.wrapperstartstopapp.run(wrapperstartstopapp.java:264) @ java.lang.thread.run(thread.java:662)

the spelling of pattern wrong in 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> 

Comments

Popular posts from this blog

python - No exponential form of the z-axis in matplotlib-3D-plots -

php - Best Light server (Linux + Web server + Database) for Raspberry Pi -

c# - "Newtonsoft.Json.JsonSerializationException unable to find constructor to use for types" error when deserializing class -