Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/spring/11.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
Forms Access spring:来自自定义标记的表单对象_Forms_Spring_Spring Mvc_Jstl - Fatal编程技术网

Forms Access spring:来自自定义标记的表单对象

Forms Access spring:来自自定义标记的表单对象,forms,spring,spring-mvc,jstl,Forms,Spring,Spring Mvc,Jstl,我正在尝试编写一个自定义jstl标记以在标记内部使用,它需要访问modelAttribute对象的属性。到目前为止,我可以将属性的名称传递给标记处理程序,但不知道如何访问modelAttribute。非常感谢您的帮助!NFV在自定义标记上创建一个属性,并使用JSP EL将其设置为model属性 在自定义标记中: <%@ attribute name="modelprop" type="com.x.y.MyObj" %> @很高兴我能帮上忙。

我正在尝试编写一个自定义jstl标记以在标记内部使用,它需要访问modelAttribute对象的属性。到目前为止,我可以将属性的名称传递给标记处理程序,但不知道如何访问modelAttribute。非常感谢您的帮助!NFV

在自定义标记上创建一个属性,并使用JSP EL将其设置为model属性

在自定义标记中:

<%@ attribute name="modelprop" type="com.x.y.MyObj" %>

@很高兴我能帮上忙。