我正在使用Tomcat9和IntelliJ旗舰版。当我启动服务器并运行这个带有前缀(myweb)的网址时,我有这个问题,这是我的项目名称(_war_exploded)。
localhost:8080/myweb_war_exploded/然后,当我运行下面的链接时,我创建了另一个页面,例如登录:
localhost:8080/login它给了我以下错误:
HTTP Status 404 – Not Found
Type Status Report
Message JSP file [/login.jsp] not found
Description The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.
Apache Tomcat/9.0.35发布于 2020-06-07 01:22:04
当您键入url localhost:8080/myweb_war_exploded/时,它会尝试加载index.html、index.jsp。因此可以尝试使用localhost:8080/myweb_war_exploded/login.jsp或以下选项
1.您可以将login.jsp的名称更改为index.jsp (OR)
2.在conf/web.xml中添加新的条目login.jsp (在页面的末尾可以找到一组欢迎文件标签) --> localhost:8080/myweb_war_exploded/ -现在将加载login.jsp (假设没有index.html或index.jsp )
https://stackoverflow.com/questions/62230476
复制相似问题