http://blog.csdn.net/barry_liao/article/details/35592935

 

 
标签: Struts1Action跳转页面空白问题解决
  1. struts配置里的forward里的name里的值和action标签里的forward的name不一致
  2. struts-config.xml配置文件里跳转路径错误

     认真检查后,并没有在代码中发现以上问题。一时间不知道哪里出问题了,最后,发现Struts1中Action的execute方法有两个很相像的,两个方法的如下:

[java] view plaincopyStruts1 不能进入Action,页面空白问题解决Struts1 不能进入Action,页面空白问题解决
  1. 1、public ActionForward execute(ActionMapping mapping, ActionForm arg1,  
  2.             ServletRequest arg2, ServletResponse arg3) throws Exception {}  
  3.   
  4. 2、public ActionForward execute(ActionMapping mapping, ActionForm form,  
  5.             HttpServletRequest request, HttpServletResponse response)  
  6.             throws Exception {}  

   经验证,使用第一种就会出现页面空白的现象,改成第二种,一切正常!

   希望对遇到同样问题的人有所帮助。

相关文章:

  • 2021-09-21
  • 2023-03-13
  • 2021-12-23
  • 2021-09-15
  • 2022-12-23
  • 2021-12-16
  • 2022-03-02
猜你喜欢
  • 2022-12-23
  • 2021-09-23
  • 2021-12-03
  • 2022-12-23
  • 2018-04-08
  • 2021-08-30
  • 2022-12-23
相关资源
相似解决方案