gpt4 book ai didi

mysql - Struts 2 FreeMarker 模板错误 stack.findValue ('top' ) 未定义且 jsp 页面

转载 作者:行者123 更新时间:2023-11-29 08:49:13 24 4
gpt4 key购买 nike

Struts 2 FreeMarker 模板错误 stack.findValue('top') 未定义且 jsp 页面

Error on line 69, column 13 in template/simple/select.ftl
stack.findValue('top') is undefined.
It cannot be assigned to itemKey
The problematic instruction:
---- ------
==> assignment: itemKey=stack.findValue('top') [on line 69, column 13 in
template/simple/select.ftl]
in user-directive s.iterator [on line 59, column 1 in template/simple/select.ftl]
in include "/${parameters.templateDir}/simple/select.ftl" [on line 24, column 1 in
template/xhtml/select.ftl]
----------
Java backtrace for programmers:
----------
freemarker.core.InvalidReferenceException: Error on line 69, column 13 in
template/simple/select.ftl
stack.findValue('top') is undefined.
It cannot be assigned to itemKey
at freemarker.core.Assignment.accept(Assignment.java:111)
at freemarker.core.Environment.visit(Environment.java:221)
at freemarker.core.MixedContent.accept(MixedContent.java:92)
at freemarker.core.Environment.visit(Environment.java:221)
at freemarker.core.IfBlock.accept(IfBlock.java:82)
at freemarker.core.Environment.visit(Environment.java:221)

基本上在我的 JSP 端,我有许多下拉选项。如何解决这个错误......!!!!!

用于下拉列表等的 JSP 页面...

    <html>
<title>JSP PAGE</title>
<body>
<s:form action="event" namespace="/" method= "post">
<h4>
<s:textfield name="description" label="Description" size="30" />
</h4>
<h4>
<s:textfield name="name" label="Name" />
</h4>
<h4>
<sx:datetimepicker name="date" label="Format (DD-MM-YYYY)"
displayFormat="dd-MMM-yyyy" value="%{'2012-01-01'}">
</sx:datetimepicker>
</h4>
<h4>
<s:textfield name="type" label="Event Type" />
</h4>
<h4>
<s:textfield name="group" label="Event Group" />
</h4>
<s:select name="Location" headerKey="-1" label="Location" list="{cityList}">
<%-- <s:iterator value="cityList">
<option>
</option>
</s:iterator> --%>
</s:select>
<s:submit value="Submit" method="execute" key="submit" align="center" />
</s:form>
</body>
</html>

最佳答案

删除下拉列表中的任何空(null)值,它引用这些值。这将解决您的问题。

关于mysql - Struts 2 FreeMarker 模板错误 stack.findValue ('top' ) 未定义且 jsp 页面,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11753971/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com