【问题标题】:Struts 2 on Google app engine. problem谷歌应用引擎上的 Struts 2。问题
【发布时间】:2023-03-13 18:04:01
【问题描述】:

我在谷歌应用引擎中使用 struts2 我的应用程序出错。

result 'null' not found 

但是当我创建监听器 OGNL 时,这个错误没有显示。

http://whyjava.wordpress.com/2009/08/30/creating-struts2-application-on-google-app-engine-gae/

为了解决这个问题,我创建了一个ServletContextListner,它将在初始化上下文时将 OGNL 安全管理器设置为 null。当我创建此侦听器时,此错误未显示。

但现在我的浏览器中有空白页面,没有任何文本。当我调用任何页面时,什么都没有显示。为什么?请帮帮我。

【问题讨论】:

  • 提供更多信息:struts.xml,主页操作

标签: java google-app-engine struts2


【解决方案1】:

Struts2 中的空页面通常与验证有关。 默认堆栈包括验证拦截器,它尝试验证除输入、返回、取消、浏览之外的所有方法:

<interceptor-ref name="validation">
    <param name="excludeMethods">input,back,cancel,browse</param>
</interceptor-ref>

尝试使用 _input 附录 (YourAction_input.action) 调用您的操作,或将执行方法添加到验证拦截器的排除方法列表中。

【讨论】:

    猜你喜欢
    • 2015-01-12
    • 1970-01-01
    • 2013-09-04
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-12-28
    • 2011-05-13
    • 1970-01-01
    相关资源
    最近更新 更多