Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/jsp/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Jsp 在Struts 2中动态生成name和value属性_Jsp_Struts2_Jstl_Struts_Ognl - Fatal编程技术网

Jsp 在Struts 2中动态生成name和value属性

Jsp 在Struts 2中动态生成name和value属性,jsp,struts2,jstl,struts,ognl,Jsp,Struts2,Jstl,Struts,Ognl,我正在将代码从Struts1迁移到Struts2 Struts1代码 在Struts2中 我试过了,但没有成功 <c:set var="notifListTemp" value="ServicesNotifList-"></c:set> <c:set var="notifListTemp1" >${notifListTemp}${serviceVO.globalId}</c:set> <c:set var="notifListTemp2"

我正在将代码从Struts1迁移到Struts2

Struts1代码

在Struts2中 我试过了,但没有成功

<c:set var="notifListTemp" value="ServicesNotifList-"></c:set>
<c:set var="notifListTemp1" >${notifListTemp}${serviceVO.globalId}</c:set>
<c:set var="notifListTemp2" value="#"></c:set>
<c:set var="notifListTemp3" >${notifListTemp1}${notifListTemp2}${serviceVO.id}</c:set>

<s:textfield theme="simple" value="${serviceVO.notifList}" name="${notifListTemp3}" 
 size="50" maxlength="1000"  />

${notifListTemp}${serviceVO.globalId}
${notifListTemp1}${notifListTemp2}${serviceVO.id}

其中
serviceVO
display:table
id.

您不能在Struts标记的属性中使用JSP EL表达式,但很高兴您可以使用OGNL表达式。不在通过
#attr
访问的值堆栈中的对象

<s:textfield theme="simple" value="%{#attr.serviceVO.notifList}" name="%{#attr.notifListTemp3}" 
     size="50" maxlength="1000"  />

您不能在Struts标记的属性中使用JSP EL表达式,但很高兴您可以使用OGNL表达式。不在通过
#attr
访问的值堆栈中的对象

<s:textfield theme="simple" value="%{#attr.serviceVO.notifList}" name="%{#attr.notifListTemp3}" 
     size="50" maxlength="1000"  />