为什么tomcat访问要加webroot啊 哭
像http://localhost:8080/test/WebRoot/index.jsp才能访问,但是这样
http://localhost:8080/test/index.jsp
就访问不了 弄了好久了 求救啊 。 各位大虾们。。在线等答案啊
像http://localhost:8080/test/WebRoot/index.jsp才能访问,但是这样
http://localhost:8080/test/index.jsp
就访问不了 弄了好久了 求救啊 。 各位大虾们。。在线等答案啊
正确的应该是像这样的
test
|-WEB-INF
|-classes
|-lib
|-web.xml
|-*.jsp
|-其他文件夹
这样就可以通过
http://localhost:8080/test/index.jsp 访问
<Context path="/test" docBase="你工程的绝对路径\WebRoot" reloadable="true"/> 重启tomcat
还有一点要把默认页设置成index.jsp,在web.xml