CCCCCCCYYY_ 2019-07-26 15:20 采纳率: 50%
浏览 6405
已采纳

idea无报错但显示空白页面是什么原因?

####idea2018.3 自带的tomcat JDK1.8
引入的eclipse maven项目 编译和启动都成功了 没有报错
然后进入localhost8080端口 显示空白页面 控制台报了如下信息:

2019-07-26 14:31:41.420 [http-nio-8080-exec-1] INFO  o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring FrameworkServlet 'dispatcherServlet'
2019-07-26 14:31:41.420 [http-nio-8080-exec-1] INFO  org.springframework.web.servlet.DispatcherServlet - FrameworkServlet 'dispatcherServlet': initialization started
2019-07-26 14:31:41.453 [http-nio-8080-exec-1] INFO  org.springframework.web.servlet.DispatcherServlet - FrameworkServlet 'dispatcherServlet': initialization completed in 33 ms
2019-07-26 14:31:41.503 [http-nio-8080-exec-1] ERROR o.springframework.boot.web.support.ErrorPageFilter - Cannot forward to error page for request [/] as the response has already been committed. As a result, the response may have the wrong status code. If your application is running on WebSphere Application Server you may be able to resolve this problem by setting com.ibm.ws.webcontainer.invokeFlushAfterService to false

直接在网址输入http://localhost:8080/login 报如下:

2019-07-26 15:13:28.972 [http-nio-8080-exec-9] WARN  o.s.w.s.m.m.a.ExceptionHandlerExceptionResolver - Resolved exception caused by Handler execution: com.coin.manager.interceptor.UserSessionException: 页面已失效,请重新登录
2019-07-26 15:13:28.978 [http-nio-8080-exec-9] WARN  o.s.w.s.m.m.a.ExceptionHandlerExceptionResolver - Resolved exception caused by Handler execution: com.coin.manager.interceptor.UserSessionException: 页面已失效,请重新登录
2019-07-26 15:13:32.408 [http-nio-8080-exec-10] WARN  o.s.w.s.m.m.a.ExceptionHandlerExceptionResolver - Resolved exception caused by Handler execution: org.springframework.web.HttpRequestMethodNotSupportedException: Request method 'GET' not supported
2019-07-26 15:13:32.410 [http-nio-8080-exec-10] ERROR o.springframework.boot.web.support.ErrorPageFilter - Cannot forward to error page for request [/login] as the response has already been committed. As a result, the response may have the wrong status code. If your application is running on WebSphere Application Server you may be able to resolve this problem by setting com.ibm.ws.webcontainer.invokeFlushAfterService to false

####**不知道是什么原因,是tomcat的问题吗?还是拦截器的原因?可是这个是从svn拉下来的,同事的eclipse完美运行**

# 页面默认前缀目录
spring.mvc.view.prefix=/WEB-INF/page/
# 响应页面默认后缀
spring.mvc.view.suffix=.jsp


  • 写回答

3条回答 默认 最新

  • Sometimes_Ymc 2019-07-26 15:59
    关注

    svn获取,同事的没问题,应该就不是代码问题,应该是配置问题。
    建议,删除项目,重新从svn获取。然后配置。
    选择对应项目的jdk版本,注意idea输出文件的位置,和eclipse有区别。maven第一次下载过,第二次应该很快,
    然后一步一步配置,然后Artifatcs 。然后配置tomcat。
    然后注意几个地方:图片说明
    建议还是用自己的tomcat,我遇到很多坑,就是这个问题。弄了几天。有时候还会昨天完美运行,今天就挂了。

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?

悬赏问题

  • ¥15 HFSS 中的 H 场图与 MATLAB 中绘制的 B1 场 部分对应不上
  • ¥15 如何在scanpy上做差异基因和通路富集?
  • ¥20 关于#硬件工程#的问题,请各位专家解答!
  • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
  • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
  • ¥30 截图中的mathematics程序转换成matlab
  • ¥15 动力学代码报错,维度不匹配
  • ¥15 Power query添加列问题
  • ¥50 Kubernetes&Fission&Eleasticsearch
  • ¥15 報錯:Person is not mapped,如何解決?