我在这里做错了什么:
<custom:tag param="<c:out value="${param.val}"/>" >
...
</custom:tag>
我不断得到
test.jsp:6: expected `>' at ``$'' (for tag `<custom:tag>' at line 6). The XML tag syntax is: <tag attr1='value1'>
但这很好:
<a href="<c:out value="${param.val}"/>">link</a>
显然我想避免
<custom:tag param="<%= request.getParameter("val") %>" />
不这样做也不行c:out
,我的jstl不知道<%@ page isELIgnored ="false" %>
摘自 tld
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN" "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">
<taglib>
<tlib-version>1.0</tlib-version>
<jsp-version>1.2</jsp-version>
<short-name>...</short-name>
<uri>...</uri>
<tag>
<name>...</name>
<tag-class>...</tag-class>
<description>...</description>
<attribute>
<name>attr1</name>
<required>true</required>
</attribute>
<attribute>
<name>param</name>
<required>true</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
</tag>
</taglib>