【发布时间】:2014-03-18 10:23:59
【问题描述】:
我从我的数据库中加载城市和州。我在 JSP 中使用了以下代码:
<s:action executeResult="true" name="LoadCities"> </s:action>
它在初始页面加载期间运行良好,但在我更新数据库中的城市时出现问题。更新成功后,我重定向这个相同的页面。
但是这次我遇到了以下异常:
The server side component of the HTTP Monitor has detected a
java.lang.StackOverflowError. This happens when there is an infinite loop in
the web module. Correct the cause of the infinite loop before running
the web module again.
2014-03-18 15:51:02,965 WARN org.apache.struts2.components.Include.warn:49 -
Exception thrown during include of header.jsp javax.servlet.ServletException:
The server side component of the HTTP Monitor has detected a
java.lang.StackOverflowError. This happens when there is an infinite loop in
the web module. Correct the cause of the infinite loop before running
the web module again.
我该如何解决这个问题?
【问题讨论】:
-
使用
<s:action>标签有什么好的理由吗? -
从数据库中加载组合框中的城市
-
您可以使用
<s:action>标签加载您的数据。 -
您可以在
execute()方法中加载数据,或者,如果您需要在验证失败后填充数据,则在prepare()方法中。 -
我在执行方法中加载数据。
标签: java hibernate jsp struts2 stack-overflow