Java servlet在intellij中运行tomcat时找不到my index.jsp
我使用intellij 好的,tomcat正在运行,一切正常,但总是给我一个404错误 my web.xml位于项目根目录下的webcontent文件夹中。 项目文件夹/WebContent/WEB-INFJava servlet在intellij中运行tomcat时找不到my index.jsp,java,maven,servlets,intellij-idea,Java,Maven,Servlets,Intellij Idea,我使用intellij 好的,tomcat正在运行,一切正常,但总是给我一个404错误 my web.xml位于项目根目录下的webcontent文件夹中。 项目文件夹/WebContent/WEB-INF <web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.
<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd" version="4.0">
<display-name>WebTicket</display-name>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
网络票证
index.html
index.jsp
我的页面位于:
projectfolder/WebContent
在项目属性中,项目方面是web
我使用servle+maven
有没有办法解决这个问题
问题很可能是在文件夹结构中,我在某个地方读到,如果项目方面发生更改,它应该得到解决,但如何做到这一点?好。
我将项目创建为动态Web模块,改为2.5,并改为4.0
2.5中Web资源的默认文件夹是projectfolder/src/main/webapp
在4.0中是projectfolder/WebContent
当我在eclipse中更改项目属性中的方面时,旧的配置仍然存在
在intellij中,只需进入文件>项目结构
facets选项卡,选择web模块并更改web资源文件夹。当通过输入URL调用的某些代码导致错误,并且您需要有关该错误的帮助时,请发布代码,发布URL,并发布您得到的准确完整的错误。