Passing a Java object value in Custom JSP tag

廉价感情. 提交于 2019-12-05 01:28:22
skaffman

The <rtexpvalue> element in your TLD should be <rtexprvalue> and needs to be set to true:

  <attribute>
     <name>parentId</name>
     <required>true</required>
     <rtexprvalue>true</rtexprvalue>
  </attribute>

This allows runtime expressions to be supplied as the attribute value. I remain mystified as to who on the JSP design team thought it was a good idea to allow this to be set to false.

Try wrapping the parentId value in ${}

<custom:zorancustomtag  parentType = "BIDFORM" parentId = "${<%= pageContext.getAttribute("bidFormOid") %>}" />
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!