I am working on Java after a long period of time so finding it hard to recall the things.
I configured an web application project in Netbeans like
WebApplication1
- Web Pages
- META-INF
- WEB-INF
- jsp (folder)
- index.jsp
- login.jsp
- loginsuccess.jsp
- applicationContext.xml (under WEB-INF)
- dispatcher-servlet.xml (under WEB-INF)
- web.xml (under WEB-INF)
- redirect.jsp (under Web Pages)
Now in web.xml under welcome file list is
<welcome-file-list>
<welcome-file>redirect.jsp</welcome-file>
</welcome-file-list>
When I try to change redirect.jsp with jsp/login.jsp or login.jso under welcome file list it says 404.
Please suggest me best way to architect and how can I change this behavior if required.
Thanks
您得到404,因为您的jsp folder
位于WEB-INF
并且由于安全原因浏览器无法访问web-inf,请将jsp文件夹保留在root folder
夹下。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.