将应用程序从jsf 1.1升级到jsf 1.2时,我收到以下错误
java.lang.ClassCastException:
Unable to convert "#{TermsOfUseBean.vin}"
to type "javax.el.ValueExpression" for attribute "value"
at weblogic.jsp.internal.jsp.utils.JspRuntimeUtils.convertType
(JspRuntimeUtils.java:150) at
jsp_servlet._termsofuse.__termsofuse._jsp__tag20(__termsofuse.java:1102)
下面是tld文件
<?xml version="1.0" encoding="ISO-8859-1" ?>
<taglib xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee/web-
jsptaglibrary_2_0.xsd"
version="2.0">
<tlib-version>2.0</tlib-version>
<jsp-version>2.1</jsp-version>
<short-name>h</short-name>
<uri>http://java.sun.com/jsf/html</uri>
编辑2:在jsp
中使用的下面的Tld标记 Tld tag used in jsp
<tag>
<name>inputHidden</name>
<tag-class>com.sun.faces.taglib.html_basic.InputHiddenTag</tag-class>
<body-content>JSP</body-content>
<attribute>
<name>converter</name>
<required>false</required>
<deferred-value>
<type>java.lang.String</type>
</deferred-value>
<!--<rtexprvalue>false</rtexprvalue>
-->
</attribute>
编辑3:JSP代码
<h:form id="touForm">
<h:inputHidden value="#{TermsOfUseBean.vin}"
id="vin">
</h:inputHidden>
</h:form>
编辑4:下面是将名称空间更改为2.1
后的堆栈跟踪 Static attribute must be a String literal, its illegal to specify an
expression.
<h:inputHidden value="#{TermsOfUseBean.vin}" id="vin">
^---^