继上一篇文章中的部署问题后,笔者又遇到了404的问题,虽说把项目在服务器上跑了起来,阔就是访问不到我的index页面呀!
404 The origin server did not find a current representation for the target resource or
如同妈妈说家里有好吃的,但是你找不到在哪里一般。难受人呀!
我认为项目既然已经部署启动了,但是报404,一定是url不对
于是我在url中输
localhost:8080/cristph/WEB-INF/jsp/index.jsp
但是依旧找不到
这是为什么呢?
因为WEB-INF文件下的 jsp文件用户是不能直接访问到的。好像是受保护的。
因此把jsp文件 挪到WebContent文件下即可了。哦耶,今天又是开心的一天。


网友评论