简体   繁体   English

即使使用请求调度程序,我也无法访问 WEB-INF/file.jsp 我收到错误 404

[英]i can't access to WEB-INF/file.jsp even with using request dispatcher i got error 404

在此处输入图片说明

I can't access to WEB-INF/test.jsp even with using request dispatcher and froward method from a 'servlet' , i get error 404 and when i try to access to http://localhost:8080/app/test.jsp ,where "/app" is the project name ,即使使用来自“servlet”的请求调度程序和转发方法,我也无法访问WEB-INF/test.jsp ,我收到错误404 ,当我尝试访问http://localhost:8080/app/test.jsp ,其中"/app"是项目名称,

Please help me , i don't know where is the problem请帮帮我,我不知道问题出在哪里

JSP pages inside WEB-INF can not be accessed by URL. WEB-INF 内的JSP 页面无法通过URL 访问。 So http://localhost:8080/app/test.js would never work.所以http://localhost:8080/app/test.js永远不会工作。

In your Servlet just add "/" before WEB-INF.在您的 Servlet 中,只需在 WEB-INF 之前添加“/”。 So it should be:所以应该是:

"/WEB-INF/test.jsp"

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM