Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用 12 年前设计的 jsp 和自定义框架开发一个 Web 项目。我们也有我们的自定义标签库。我正在尝试使用一个 taglib 的返回值作为另一个 taglib 的参数,代码如下所示:
<ta:GetName id="<ta:GetID lastName='abc' />" />
但它不起作用,它正在通过
<ta:GetID lastName='abc' />
在参数中不是标签GetID的返回值。如果是的话,我该怎么做,我该怎么做。
我在这里先向您的帮助表示感谢。
你不能。您必须修改 GetId 标记,以便它将结果存储到属性中,而不是将其打印到 JSP 编写器,就像许多 JSTL 标记所做的那样:
<ta:GetID lastName="abc" var="theId"/> <ta:GetName id="${theId}" />