Tomcat启动报错:Error starting static Resources

今天启动Tomcat,报错:

严重: Error starting static Resources
java.lang.IllegalArgumentException: Document base D:\workspace\Study\Struts\demo\WebRoot does not exist or is not a readable directory
	at org.apache.naming.resources.FileDirContext.setDocBase(FileDirContext.java:141)
	at org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:3855)
	at org.apache.catalina.core.StandardContext.start(StandardContext.java:4024)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
	at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
	at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
	at org.apache.catalina.core.StandardService.start(StandardService.java:448)
	at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
	at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
	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:295)
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)

 

 

 当时很纳闷,那个工程早删掉了,后来终于找到根源,原来是server.xml文件的一句

<Context path="/demo" docBase="D:\workspace\Study\Struts\demo\WebRoot" reloadable="true"/>

 在捣鬼,把它注释掉就OK了!

 

你可能感兴趣的:(java,apache,tomcat,struts,sun)