如何将JSP变量转换为Struts2变量? [英] How do I convert a JSP variable to a Struts2 variable?
本文介绍了如何将JSP变量转换为Struts2变量?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何将JSP变量转换为Struts2变量?
How do I convert a JSP variable to a Struts2 variable?
我尝试了以下操作:
<%=scoredDocument%>
<s:push value="scoredDocument"/>
<s:push value="#scoredDocument"/>
<s:push value="%{scoredDocument}"/>
<s:push value="${scoredDocument}"/>
<s:push value="#page.scoredDocument"/>
<s:push value="%{#page.scoredDocument}"/>
<display:column title="Study Code" sortable="true">
<s:property value="id"/>
最常见的错误是
起因:标记"push",字段"value":您必须指定一个值以压入堆栈.示例:人员-[未知位置]
Caused by: tag 'push', field 'value': You must specify a value to push on the stack. Example: person - [unknown location]
推荐答案
<s:push>
必须包含<s:property>
标记.还有
<s:push value="#attr.scoredDocument">
<display:column title="Study Code" sortable="true">
<s:property value="id"/>
</display:column>
</s:push>
#attr
? WTF Struts?甚至没有记录! https://struts.apache.org/release/2.0.x/docs /jsp.html
#attr
? WTF Struts? It's not even documented! https://struts.apache.org/release/2.0.x/docs/jsp.html
这篇关于如何将JSP变量转换为Struts2变量?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文