tomcat运行java WEB项目打开所有页面都是404咋回事

weixin_40125386 2018-03-16 03:15:06
...全文
4131 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
不定 2018-08-23
  • 打赏
  • 举报
回复
可能是某个XML文件中最新添加的sql标签,返回值resultMap在该xml文件中没有定义
  • 打赏
  • 举报
回复
你貌似并没有设置首页,而你那样访问/crm/index.jsp,如果jsp是放在WEB-INF下面的,是不能直接访问,需要由程序内部访问 此外,确认一下你项目启动成功了/crm 是可以访问的, 最后,输入到8080后直接访问tomcat页面,查看项目是否已成功部署
young-me 2018-05-08
  • 打赏
  • 举报
回复
引用 2 楼 weixin_40125386的回复:
别的项目没问题,就这个项目不可以
如果其他项目没问题,页面代码没问题,问题应该是出在配置文件Server.xml这种是不是有错误或者误删了
weixin_40125386 2018-03-17
  • 打赏
  • 举报
回复
有的
xueyuxiongshi 2018-03-16
  • 打赏
  • 举报
回复
看一下你的tomcat安装目录下的webapps文件夹下有没有crm文件夹,然后crm文件夹下有没有index.jsp
weixin_40125386 2018-03-16
  • 打赏
  • 举报
回复
WEB.XML如下<?xml version="1.0" encoding="UTF-8"?> <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5"> <display-name>crm</display-name> <!-- spring配置文件 --> <context-param> <param-name>contextConfigLocation</param-name> <param-value>classpath:applicationContext.xml</param-value> </context-param> <listener> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> </listener> <!-- springmvc配置文件 --> <servlet> <servlet-name>springDispatcherServlet</servlet-name> <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class> <init-param> <param-name>contextConfigLocation</param-name> <param-value>classpath:springmvc.xml</param-value> </init-param> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>springDispatcherServlet</servlet-name> <url-pattern>/</url-pattern> </servlet-mapping> <!-- 请求乱码的处理 --> <filter> <filter-name>CharacterEncodingFilter</filter-name> <filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class> <init-param> <param-name>Encoding</param-name> <param-value>UTF-8</param-value> </init-param> </filter> <filter-mapping> <filter-name>CharacterEncodingFilter</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> <!--将post请求转化为put或者delete请求--> <filter> <filter-name>hiddenHttpMethodFilter</filter-name> <filter-class>org.springframework.web.filter.HiddenHttpMethodFilter</filter-class> </filter> <filter-mapping> <filter-name>hiddenHttpMethodFilter</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> </web-app>
weixin_40125386 2018-03-16
  • 打赏
  • 举报
回复
别的项目没问题,就这个项目不可以

24,923

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 Apache
社区管理员
  • Apache
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧