2

While upgrading the application from jsf 1.1 to jsf 1.2 i am getting the below error

    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)

Below is the tld file

   <?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>

Edit 2: Tld tag below that is used in jsp

  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>

Edit 3: JSP code

       <h:form id="touForm">
            <h:inputHidden value="#{TermsOfUseBean.vin}"
                           id="vin">
            </h:inputHidden>
        </h:form>

Edit 4: Below is stack trace after changed the namespace to 2.1

    Static attribute must be a String literal, its illegal to specify an
     expression.
  <h:inputHidden value="#{TermsOfUseBean.vin}" id="vin">
                      ^---^
sai
  • 59
  • 11
  • 1
    @BalusC do you have any idea. – sai Feb 09 '15 at 14:18
  • 1
    As already stated, you are likely to face unusual problems regularly with those versions. Why not given them up and upgrade the application to have at least JSF 2.x? It is even quite difficult to get some help for those legacy JSF versions. – Tiny Feb 09 '15 at 14:45
  • You don't even provide the JSP code where this exception appears. Seriously, it's hard to help you with the current state of your question. – Luiggi Mendoza Feb 09 '15 at 15:36

0 Answers0