如何将 JSP 变量转换为 Struts2 变量?
我尝试过以下方法:
<%=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"/>
最常见的错误是
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
?什么是Struts?甚至没有记录! https://struts.apache.org/release/2.0.x/docs/jsp.html
关于java - 如何将 JSP 变量转换为 Struts2 变量?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20232665/