org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[]

运行servlet程序报错:

org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/WebTest]]

Caused by: java.lang.IllegalArgumentException: Invalid <url-pattern> in servlet mapping

原因:

web.xml里面的url-pattern配置不正确,可能是少了个斜杠  /

解决方案:

<url-pattern>redirect<url-pattern>

改为<url-pattern>/redirect<url-pattern>

上一篇:如何修改linux时间? 校正linux系统的时间


下一篇:*/dapper的Dapper-Extensions用法(二)