A context path must either be an empty string or start with a '/' and do not end with a '/' 问题解决方法

A context path must either be an empty string or start with a '/' and do not end with a '/'
上下文路径必须是一个空字符串,或者以“/”开头,不要以“/”结尾。

原因:tomcat的server.xml中添加了多余的无效的context标签,将其删除即可。

举例:
我出现的问题是:
十一月 23, 2016 5:17:05 下午 org.apache.catalina.core.StandardContext setPath
警告: A context path must either be an empty string or start with a '/' and do not end with a '/'. The path [Struts2_071_ActionParamInput] does not meet these criteria and has been changed to [/Struts2_071_ActionParamInput]

原来我的tomcat的server.xml文件中出现了这一段(之前手动加入的,没有删除)

将其删除即可。
提示:server.xml在tomcat的config目录下。

你可能感兴趣的:(A context path must either be an empty string or start with a '/' and do not end with a '/' 问题解决方法)