You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Andreas Kramer <al...@gmx.li> on 2007/10/16 18:09:38 UTC

Unable to convert String (Faces 1.2)

Hi

 

I got the following problem:

 

When opening a very simple jsp page just containing an <h:outputText
value="test"/>.

I receive the following error:

 

exception 

javax.servlet.ServletException: Unable to convert string "test" to class
"javax.el.ValueExpression" for attribute "value": Property Editor not
registered with the PropertyEditorManager
        javax.faces.webapp.FacesServlet.service(FacesServlet.java:152)

root cause 

javax.faces.FacesException: Unable to convert string "test" to class
"javax.el.ValueExpression" for attribute "value": Property Editor not
registered with the PropertyEditorManager
 
org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(Servl
etExternalContextImpl.java:340)
 
org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHand
lerImpl.java:254)
 
org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseEx
ecutor.java:41)
 
org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:132)
        javax.faces.webapp.FacesServlet.service(FacesServlet.java:138)

 

 

My setup:

 

Myfaces 1.2.0

Tomahawk 6.014

Eclipse WTP 3.3

JDK 6

 

Page: 

<%@ page language="java" contentType="text/html; charset=ISO-8859-1"

    pageEncoding="ISO-8859-1"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

<html>

<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>

<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>

 

 

<head>

<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">

<title>Insert title here</title>

</head>

<body>

      <h:outputText value="test"/>

 

</body>

</html>

 

Web.xml:

<?xml version="1.0" encoding="UTF-8"?>

<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID"
version="2.5">

  <display-name>JSF2</display-name>

  <welcome-file-list>

    <welcome-file>index.html</welcome-file>

    <welcome-file>index.htm</welcome-file>

    <welcome-file>index.jsp</welcome-file>

    <welcome-file>default.html</welcome-file>

    <welcome-file>default.htm</welcome-file>

    <welcome-file>default.jsp</welcome-file>

  </welcome-file-list>

  <servlet>

    <servlet-name>Faces Servlet</servlet-name>

    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>

    <load-on-startup>1</load-on-startup>

  </servlet>

  <servlet-mapping>

    <servlet-name>Faces Servlet</servlet-name>

    <url-pattern>/faces/*</url-pattern>

  </servlet-mapping>

</web-app>

 

Faces-config.xml

 

<?xml version="1.0" encoding="UTF-8"?>

 

<faces-config

    xmlns="http://java.sun.com/xml/ns/javaee"

    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd"

    version="1.2">

 

</faces-config>

 

WEB-INF/lib:

 

commons-beanutils-1.7.0.jar

commons-codec-1.3.jar

commons-collections-3.2.jar

commons-digester-1.8.jar

commons-discovery-0.4.jar

commons-logging-1.1.jar

jstl-1.2.jar

myfaces-api-1.2.0.jar

myfaces-impl-1.2.0.jar

standard-1.1.2.jar


AW: AW: Unable to convert String (Faces 1.2)

Posted by Andreas Kramer <al...@gmx.li>.
Hi Bryan

 

Well, I've read that MyFaces 1.2 should work, if you change a tld in the
faces-api.

There must be a conflict between  the faces tld (h.tld or faces-core.tld)
and another one. Unfortunately I didn't understood

What was exactly meant.

 

See: http://www.mail-archive.com/dev@myfaces.apache.org/msg24051.html

 

And Exactly:
http://www.mail-archive.com/dev@myfaces.apache.org/msg24593.html

 

Maybe someone else understands this thread?

 

Thanks in advance

 

Andreas

 

  _____  

Von: Bryan Basham [mailto:bbasham@stillsecure.com] 
Gesendet: Dienstag, 16. Oktober 2007 22:40
An: MyFaces Discussion
Betreff: Re: AW: Unable to convert String (Faces 1.2)

 

Yes, you are correct; in fact, I just ran across an h:outputText
component that I created a few months ago that uses a plain string.
Works fine for me.

However, I have never used MyFaces/JSF v1.2 so I have no idea
what the problem could be.  My only guess is that you have conflicting
EL libraries.

Good luck,
Bryan

Andreas Kramer wrote: 

Hello Bryan

 

Thanks for your tip.

 

"value" should handle Strings also, anyway I tried to acces a bean property
but the error is still the same.

 

      <h:outputText value="#{testBean.test}"/>

 

Think it's another problem, any further ideas?

 

Regards

 

Andreas

 

  _____  

Von: Bryan Basham [mailto:bbasham@stillsecure.com] 
Gesendet: Dienstag, 16. Oktober 2007 18:26
An: MyFaces Discussion
Betreff: Re: Unable to convert String (Faces 1.2)

 

Hello Andreas,

The value tag attribute expects a JSF value binding of the form
#{bean.property}.
However if you want to test a static value try this:
<h:outputText value="#{'test'}"/>

Cheers,
Bryan

Andreas Kramer wrote: 

Hi

 

I got the following problem:

 

When opening a very simple jsp page just containing an <h:outputText
value="test"/>.

I receive the following error:

 

exception 

javax.servlet.ServletException: Unable to convert string "test" to class
"javax.el.ValueExpression" for attribute "value": Property Editor not
registered with the PropertyEditorManager
        javax.faces.webapp.FacesServlet.service(FacesServlet.java:152)

root cause 

javax.faces.FacesException: Unable to convert string "test" to class
"javax.el.ValueExpression" for attribute "value": Property Editor not
registered with the PropertyEditorManager
 
org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(Servl
etExternalContextImpl.java:340)
 
org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHand
lerImpl.java:254)
 
org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseEx
ecutor.java:41)
 
org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:132)
        javax.faces.webapp.FacesServlet.service(FacesServlet.java:138)

 

 

My setup:

 

Myfaces 1.2.0

Tomahawk 6.014

Eclipse WTP 3.3

JDK 6

 

Page: 

<%@ page language="java" contentType="text/html; charset=ISO-8859-1"

    pageEncoding="ISO-8859-1"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
<http://www.w3.org/TR/html4/loose.dtd>
"http://www.w3.org/TR/html4/loose.dtd">

<html>

<%@ taglib uri= <http://java.sun.com/jsf/html>
"http://java.sun.com/jsf/html" prefix="h"%>

<%@ taglib uri= <http://java.sun.com/jsf/core>
"http://java.sun.com/jsf/core" prefix="f"%>

 

 

<head>

<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">

<title>Insert title here</title>

</head>

<body>

      <h:outputText value="test"/>

 

</body>

</html>

 

Web.xml:

<?xml version="1.0" encoding="UTF-8"?>

<web-app xmlns:xsi= <http://www.w3.org/2001/XMLSchema-instance>
"http://www.w3.org/2001/XMLSchema-instance" xmlns=
<http://java.sun.com/xml/ns/javaee> "http://java.sun.com/xml/ns/javaee"
xmlns:web= <http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd>
"http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation=
<http://java.sun.com/xml/ns/javaeehttp:/java.sun.com/xml/ns/javaee/web-app_2
_5.xsd> "http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID"
version="2.5">

  <display-name>JSF2</display-name>

  <welcome-file-list>

    <welcome-file>index.html</welcome-file>

    <welcome-file>index.htm</welcome-file>

    <welcome-file>index.jsp</welcome-file>

    <welcome-file>default.html</welcome-file>

    <welcome-file>default.htm</welcome-file>

    <welcome-file>default.jsp</welcome-file>

  </welcome-file-list>

  <servlet>

    <servlet-name>Faces Servlet</servlet-name>

    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>

    <load-on-startup>1</load-on-startup>

  </servlet>

  <servlet-mapping>

    <servlet-name>Faces Servlet</servlet-name>

    <url-pattern>/faces/*</url-pattern>

  </servlet-mapping>

</web-app>

 

Faces-config.xml

 

<?xml version="1.0" encoding="UTF-8"?>

 

<faces-config

    xmlns= <http://java.sun.com/xml/ns/javaee>
"http://java.sun.com/xml/ns/javaee"

    xmlns:xsi= <http://www.w3.org/2001/XMLSchema-instance>
"http://www.w3.org/2001/XMLSchema-instance"

    xsi:schemaLocation=
<http://java.sun.com/xml/ns/javaeehttp:/java.sun.com/xml/ns/javaee/web-faces
config_1_2.xsd> "http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd"

    version="1.2">

 

</faces-config>

 

WEB-INF/lib:

 

commons-beanutils-1.7.0.jar

commons-codec-1.3.jar

commons-collections-3.2.jar

commons-digester-1.8.jar

commons-discovery-0.4.jar

commons-logging-1.1.jar

jstl-1.2.jar

myfaces-api-1.2.0.jar

myfaces-impl-1.2.0.jar

standard-1.1.2.jar

 

 


Re: AW: Unable to convert String (Faces 1.2)

Posted by Bryan Basham <bb...@stillsecure.com>.
Yes, you are correct; in fact, I just ran across an h:outputText
component that I created a few months ago that uses a plain string.
Works fine for me.

However, I have never used MyFaces/JSF v1.2 so I have no idea
what the problem could be.  My only guess is that you have conflicting
EL libraries.

Good luck,
Bryan

Andreas Kramer wrote:
>
> Hello Bryan
>
>  
>
> Thanks for your tip.
>
>  
>
> "value" should handle Strings also, anyway I tried to acces a bean 
> property but the error is still the same.
>
>  
>
>       <h:outputText value="#{testBean.test}"/>
>
>  
>
> Think it's another problem, any further ideas?
>
>  
>
> Regards
>
>  
>
> Andreas
>
>  
>
> ------------------------------------------------------------------------
>
> *Von:* Bryan Basham [mailto:bbasham@stillsecure.com]
> *Gesendet:* Dienstag, 16. Oktober 2007 18:26
> *An:* MyFaces Discussion
> *Betreff:* Re: Unable to convert String (Faces 1.2)
>
>  
>
> Hello Andreas,
>
> The value tag attribute expects a JSF value binding of the form 
> #{bean.property}.
> However if you want to test a static value try this:
> <h:outputText value="#{'test'}"/>
>
> Cheers,
> Bryan
>
> Andreas Kramer wrote:
>
> Hi
>
>  
>
> I got the following problem:
>
>  
>
> When opening a very simple jsp page just containing an <h:outputText 
> value="test"/>.
>
> I receive the following error:
>
>  
>
> *exception*
>
> javax.servlet.ServletException: Unable to convert string "test" to class "javax.el.ValueExpression" for attribute "value": Property Editor not registered with the PropertyEditorManager
>         javax.faces.webapp.FacesServlet.service(FacesServlet.java:152)
>
> *root cause*
>
> javax.faces.FacesException: Unable to convert string "test" to class "javax.el.ValueExpression" for attribute "value": Property Editor not registered with the PropertyEditorManager
>         org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:340)
>         org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:254)
>         org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:41)
>         org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:132)
>         javax.faces.webapp.FacesServlet.service(FacesServlet.java:138)
>
>  
>
>  
>
> My setup:
>
>  
>
> Myfaces 1.2.0
>
> Tomahawk 6.014
>
> Eclipse WTP 3.3
>
> JDK 6
>
>  
>
> Page:
>
> <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
>
>     pageEncoding="ISO-8859-1"%>
>
> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 
> "http://www.w3.org/TR/html4/loose.dtd" 
> <http://www.w3.org/TR/html4/loose.dtd>>
>
> <html>
>
> <%@ taglib uri="http://java.sun.com/jsf/html" 
> <http://java.sun.com/jsf/html> prefix="h"%>
>
> <%@ taglib uri="http://java.sun.com/jsf/core" 
> <http://java.sun.com/jsf/core> prefix="f"%>
>
>  
>
>  
>
> <head>
>
> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
>
> <title>Insert title here</title>
>
> </head>
>
> <body>
>
>       <h:outputText value="test"/>
>
>  
>
> </body>
>
> </html>
>
>  
>
> Web.xml:
>
> <?xml version="1.0" encoding="UTF-8"?>
>
> <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
> <http://www.w3.org/2001/XMLSchema-instance> 
> xmlns="http://java.sun.com/xml/ns/javaee" 
> <http://java.sun.com/xml/ns/javaee> 
> xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" 
> <http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd> 
> xsi:schemaLocation="http://java.sun.com/xml/ns/javaee 
> http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" 
> <http://java.sun.com/xml/ns/javaeehttp:/java.sun.com/xml/ns/javaee/web-app_2_5.xsd> 
> id="WebApp_ID" version="2.5">
>
>   <display-name>JSF2</display-name>
>
>   <welcome-file-list>
>
>     <welcome-file>index.html</welcome-file>
>
>     <welcome-file>index.htm</welcome-file>
>
>     <welcome-file>index.jsp</welcome-file>
>
>     <welcome-file>default.html</welcome-file>
>
>     <welcome-file>default.htm</welcome-file>
>
>     <welcome-file>default.jsp</welcome-file>
>
>   </welcome-file-list>
>
>   <servlet>
>
>     <servlet-name>Faces Servlet</servlet-name>
>
>     <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
>
>     <load-on-startup>1</load-on-startup>
>
>   </servlet>
>
>   <servlet-mapping>
>
>     <servlet-name>Faces Servlet</servlet-name>
>
>     <url-pattern>/faces/*</url-pattern>
>
>   </servlet-mapping>
>
> </web-app>
>
>  
>
> Faces-config.xml
>
>  
>
> <?xml version="1.0" encoding="UTF-8"?>
>
>  
>
> <faces-config
>
>     xmlns="http://java.sun.com/xml/ns/javaee" 
> <http://java.sun.com/xml/ns/javaee>
>
>     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
> <http://www.w3.org/2001/XMLSchema-instance>
>
>     xsi:schemaLocation="http://java.sun.com/xml/ns/javaee 
> http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd" 
> <http://java.sun.com/xml/ns/javaeehttp:/java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd>
>
>     version="1.2">
>
>  
>
> </faces-config>
>
>  
>
> WEB-INF/lib:
>
>  
>
> commons-beanutils-1.7.0.jar
>
> commons-codec-1.3.jar
>
> commons-collections-3.2.jar
>
> commons-digester-1.8.jar
>
> commons-discovery-0.4.jar
>
> commons-logging-1.1.jar
>
> jstl-1.2.jar
>
> myfaces-api-1.2.0.jar
>
> myfaces-impl-1.2.0.jar
>
> standard-1.1.2.jar
>
>  
>


AW: Unable to convert String (Faces 1.2)

Posted by Andreas Kramer <al...@gmx.li>.
Hello Bryan

 

Thanks for your tip.

 

"value" should handle Strings also, anyway I tried to acces a bean property
but the error is still the same.

 

      <h:outputText value="#{testBean.test}"/>

 

Think it's another problem, any further ideas?

 

Regards

 

Andreas

 

  _____  

Von: Bryan Basham [mailto:bbasham@stillsecure.com] 
Gesendet: Dienstag, 16. Oktober 2007 18:26
An: MyFaces Discussion
Betreff: Re: Unable to convert String (Faces 1.2)

 

Hello Andreas,

The value tag attribute expects a JSF value binding of the form
#{bean.property}.
However if you want to test a static value try this:
<h:outputText value="#{'test'}"/>

Cheers,
Bryan

Andreas Kramer wrote: 

Hi

 

I got the following problem:

 

When opening a very simple jsp page just containing an <h:outputText
value="test"/>.

I receive the following error:

 

exception 

javax.servlet.ServletException: Unable to convert string "test" to class
"javax.el.ValueExpression" for attribute "value": Property Editor not
registered with the PropertyEditorManager
        javax.faces.webapp.FacesServlet.service(FacesServlet.java:152)

root cause 

javax.faces.FacesException: Unable to convert string "test" to class
"javax.el.ValueExpression" for attribute "value": Property Editor not
registered with the PropertyEditorManager
 
org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(Servl
etExternalContextImpl.java:340)
 
org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHand
lerImpl.java:254)
 
org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseEx
ecutor.java:41)
 
org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:132)
        javax.faces.webapp.FacesServlet.service(FacesServlet.java:138)

 

 

My setup:

 

Myfaces 1.2.0

Tomahawk 6.014

Eclipse WTP 3.3

JDK 6

 

Page: 

<%@ page language="java" contentType="text/html; charset=ISO-8859-1"

    pageEncoding="ISO-8859-1"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
<http://www.w3.org/TR/html4/loose.dtd>
"http://www.w3.org/TR/html4/loose.dtd">

<html>

<%@ taglib uri= <http://java.sun.com/jsf/html>
"http://java.sun.com/jsf/html" prefix="h"%>

<%@ taglib uri= <http://java.sun.com/jsf/core>
"http://java.sun.com/jsf/core" prefix="f"%>

 

 

<head>

<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">

<title>Insert title here</title>

</head>

<body>

      <h:outputText value="test"/>

 

</body>

</html>

 

Web.xml:

<?xml version="1.0" encoding="UTF-8"?>

<web-app xmlns:xsi= <http://www.w3.org/2001/XMLSchema-instance>
"http://www.w3.org/2001/XMLSchema-instance" xmlns=
<http://java.sun.com/xml/ns/javaee> "http://java.sun.com/xml/ns/javaee"
xmlns:web= <http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd>
"http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation=
<http://java.sun.com/xml/ns/javaeehttp:/java.sun.com/xml/ns/javaee/web-app_2
_5.xsd> "http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID"
version="2.5">

  <display-name>JSF2</display-name>

  <welcome-file-list>

    <welcome-file>index.html</welcome-file>

    <welcome-file>index.htm</welcome-file>

    <welcome-file>index.jsp</welcome-file>

    <welcome-file>default.html</welcome-file>

    <welcome-file>default.htm</welcome-file>

    <welcome-file>default.jsp</welcome-file>

  </welcome-file-list>

  <servlet>

    <servlet-name>Faces Servlet</servlet-name>

    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>

    <load-on-startup>1</load-on-startup>

  </servlet>

  <servlet-mapping>

    <servlet-name>Faces Servlet</servlet-name>

    <url-pattern>/faces/*</url-pattern>

  </servlet-mapping>

</web-app>

 

Faces-config.xml

 

<?xml version="1.0" encoding="UTF-8"?>

 

<faces-config

    xmlns= <http://java.sun.com/xml/ns/javaee>
"http://java.sun.com/xml/ns/javaee"

    xmlns:xsi= <http://www.w3.org/2001/XMLSchema-instance>
"http://www.w3.org/2001/XMLSchema-instance"

    xsi:schemaLocation=
<http://java.sun.com/xml/ns/javaeehttp:/java.sun.com/xml/ns/javaee/web-faces
config_1_2.xsd> "http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd"

    version="1.2">

 

</faces-config>

 

WEB-INF/lib:

 

commons-beanutils-1.7.0.jar

commons-codec-1.3.jar

commons-collections-3.2.jar

commons-digester-1.8.jar

commons-discovery-0.4.jar

commons-logging-1.1.jar

jstl-1.2.jar

myfaces-api-1.2.0.jar

myfaces-impl-1.2.0.jar

standard-1.1.2.jar

 


Re: Unable to convert String (Faces 1.2)

Posted by Bryan Basham <bb...@stillsecure.com>.
Hello Andreas,

The value tag attribute expects a JSF value binding of the form 
#{bean.property}.
However if you want to test a static value try this:
<h:outputText value="#{'test'}"/>

Cheers,
Bryan

Andreas Kramer wrote:
>
> Hi
>
>  
>
> I got the following problem:
>
>  
>
> When opening a very simple jsp page just containing an <h:outputText 
> value="test"/>.
>
> I receive the following error:
>
>  
>
> *exception*
>
> javax.servlet.ServletException: Unable to convert string "test" to class "javax.el.ValueExpression" for attribute "value": Property Editor not registered with the PropertyEditorManager
>         javax.faces.webapp.FacesServlet.service(FacesServlet.java:152)
>
> *root cause*
>
> javax.faces.FacesException: Unable to convert string "test" to class "javax.el.ValueExpression" for attribute "value": Property Editor not registered with the PropertyEditorManager
>         org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:340)
>         org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:254)
>         org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:41)
>         org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:132)
>         javax.faces.webapp.FacesServlet.service(FacesServlet.java:138)
>
>  
>
>  
>
> My setup:
>
>  
>
> Myfaces 1.2.0
>
> Tomahawk 6.014
>
> Eclipse WTP 3.3
>
> JDK 6
>
>  
>
> Page:
>
> <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
>
>     pageEncoding="ISO-8859-1"%>
>
> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 
> "http://www.w3.org/TR/html4/loose.dtd">
>
> <html>
>
> <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
>
> <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
>
>  
>
>  
>
> <head>
>
> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
>
> <title>Insert title here</title>
>
> </head>
>
> <body>
>
>       <h:outputText value="test"/>
>
>  
>
> </body>
>
> </html>
>
>  
>
> Web.xml:
>
> <?xml version="1.0" encoding="UTF-8"?>
>
> <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
> xmlns="http://java.sun.com/xml/ns/javaee" 
> xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" 
> xsi:schemaLocation="http://java.sun.com/xml/ns/javaee 
> http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" 
> version="2.5">
>
>   <display-name>JSF2</display-name>
>
>   <welcome-file-list>
>
>     <welcome-file>index.html</welcome-file>
>
>     <welcome-file>index.htm</welcome-file>
>
>     <welcome-file>index.jsp</welcome-file>
>
>     <welcome-file>default.html</welcome-file>
>
>     <welcome-file>default.htm</welcome-file>
>
>     <welcome-file>default.jsp</welcome-file>
>
>   </welcome-file-list>
>
>   <servlet>
>
>     <servlet-name>Faces Servlet</servlet-name>
>
>     <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
>
>     <load-on-startup>1</load-on-startup>
>
>   </servlet>
>
>   <servlet-mapping>
>
>     <servlet-name>Faces Servlet</servlet-name>
>
>     <url-pattern>/faces/*</url-pattern>
>
>   </servlet-mapping>
>
> </web-app>
>
>  
>
> Faces-config.xml
>
>  
>
> <?xml version="1.0" encoding="UTF-8"?>
>
>  
>
> <faces-config
>
>     xmlns="http://java.sun.com/xml/ns/javaee"
>
>     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>
>     xsi:schemaLocation="http://java.sun.com/xml/ns/javaee 
> http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd"
>
>     version="1.2">
>
>  
>
> </faces-config>
>
>  
>
> WEB-INF/lib:
>
>  
>
> commons-beanutils-1.7.0.jar
>
> commons-codec-1.3.jar
>
> commons-collections-3.2.jar
>
> commons-digester-1.8.jar
>
> commons-discovery-0.4.jar
>
> commons-logging-1.1.jar
>
> jstl-1.2.jar
>
> myfaces-api-1.2.0.jar
>
> myfaces-impl-1.2.0.jar
>
> standard-1.1.2.jar
>


AW: Unable to convert String (Faces 1.2)

Posted by Andreas Kramer <al...@gmx.li>.
Hi Thomas, All

Thanks for his remark:

Having:

<f:view>
	<h:outputText value="#{testBean.test}"/>
</f:view>

I receive the following error:



javax.servlet.ServletException: /login.jsp(15,1) According to TLD or
attribute directive in tag file, attribute value does not accept any
expressions
	javax.faces.webapp.FacesServlet.service(FacesServlet.java:152)


type Exception report

message 

description The server encountered an internal error () that prevented it
from fulfilling this request.

exception 

javax.servlet.ServletException: /login.jsp(15,1) According to TLD or
attribute directive in tag file, attribute value does not accept any
expressions
	javax.faces.webapp.FacesServlet.service(FacesServlet.java:152)


root cause 

javax.faces.FacesException: /login.jsp(15,1) According to TLD or attribute
directive in tag file, attribute value does not accept any expressions
	
org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(Servl
etExternalContextImpl.java:340)
	
org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHand
lerImpl.java:254)
	
org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseEx
ecutor.java:41)
	
org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:132)
	javax.faces.webapp.FacesServlet.service(FacesServlet.java:138)


root cause 

org.apache.jasper.JasperException: /login.jsp(15,1) According to TLD or
attribute directive in tag file, attribute value does not accept any
expressions
	
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.
java:40)
	
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407
)
	
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:148
)
	
org.apache.jasper.compiler.Validator$ValidateVisitor.checkXmlAttributes(Vali
dator.java:1172)
	
org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator.java:81
9)
	org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1507)
	org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2338)
	org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2388)
	
org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator.java:83
8)
	org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1507)
	org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2338)
	org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2388)
	org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2394)
	org.apache.jasper.compiler.Node$Root.accept(Node.java:489)
	org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2338)
	org.apache.jasper.compiler.Validator.validate(Validator.java:1737)
	org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:178)
	org.apache.jasper.compiler.Compiler.compile(Compiler.java:306)
	org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
	org.apache.jasper.compiler.Compiler.compile(Compiler.java:273)
	
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:5
66)
	
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:3
17)
	
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
	
org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(Servl
etExternalContextImpl.java:334)
	
org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHand
lerImpl.java:254)
	
org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseEx
ecutor.java:41)
	
org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:132)
	javax.faces.webapp.FacesServlet.service(FacesServlet.java:138)


Does this help you?

Regards

Andreas


-----Ursprüngliche Nachricht-----
Von: Thomas Fischer [mailto:fischer@seitenbau.net] 
Gesendet: Mittwoch, 17. Oktober 2007 10:10
An: MyFaces Discussion
Betreff: RE: Unable to convert String (Faces 1.2)

Hi andreas,

you forgot the f:view tags around your page.

     Thomas
"Andreas Kramer" <al...@gmx.li> schrieb am 16.10.2007 18:09:38:

> Hi
>
> I got the following problem:
>
> When opening a very simple jsp page just containing an <h:outputText
value=”test”/>.
> I receive the following error:
>
> exception
> javax.servlet.ServletException: Unable to convert string "test" to class
> "javax.el.ValueExpression" for attribute "value": Property Editor not
> registered with the PropertyEditorManager
>         javax.faces.webapp.FacesServlet.service(FacesServlet.java:152)
> root cause
> javax.faces.FacesException: Unable to convert string "test" to class
"javax.
> el.ValueExpression" for attribute "value": Property Editor not registered
with
> the PropertyEditorManager
>         org.apache.myfaces.context.servlet.ServletExternalContextImpl.
> dispatch(ServletExternalContextImpl.java:340)
>         org.apache.myfaces.application.jsp.JspViewHandlerImpl.
> renderView(JspViewHandlerImpl.java:254)
>         org.apache.myfaces.lifecycle.RenderResponseExecutor.
> execute(RenderResponseExecutor.java:41)
>
org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:132)
>         javax.faces.webapp.FacesServlet.service(FacesServlet.java:138)
>
>
> My setup:
>
> Myfaces 1.2.0
> Tomahawk 6.014
> Eclipse WTP 3.3
> JDK 6
>
> Page:
> <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
>     pageEncoding="ISO-8859-1"%>
> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.
> org/TR/html4/loose.dtd">
> <html>
> <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
> <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
>
>
> <head>
> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
> <title>Insert title here</title>
> </head>
> <body>
>       <h:outputText value="test"/>
>
> </body>
> </html>
>
> Web.xml:
> <?xml version="1.0" encoding="UTF-8"?>
> <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http:
> //java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.
> com/xml/ns/javaee/web-app_2_5.xsd"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
> http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID"
version="2.5">
>   <display-name>JSF2</display-name>
>   <welcome-file-list>
>     <welcome-file>index.html</welcome-file>
>     <welcome-file>index.htm</welcome-file>
>     <welcome-file>index.jsp</welcome-file>
>     <welcome-file>default.html</welcome-file>
>     <welcome-file>default.htm</welcome-file>
>     <welcome-file>default.jsp</welcome-file>
>   </welcome-file-list>
>   <servlet>
>     <servlet-name>Faces Servlet</servlet-name>
>     <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
>     <load-on-startup>1</load-on-startup>
>   </servlet>
>   <servlet-mapping>
>     <servlet-name>Faces Servlet</servlet-name>
>     <url-pattern>/faces/*</url-pattern>
>   </servlet-mapping>
> </web-app>
>
> Faces-config.xml
>
> <?xml version="1.0" encoding="UTF-8"?>
>
> <faces-config
>     xmlns="http://java.sun.com/xml/ns/javaee"
>     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>     xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.
> com/xml/ns/javaee/web-facesconfig_1_2.xsd"
>     version="1.2">
>
> </faces-config>
>
> WEB-INF/lib:
>
> commons-beanutils-1.7.0.jar
> commons-codec-1.3.jar
> commons-collections-3.2.jar
> commons-digester-1.8.jar
> commons-discovery-0.4.jar
> commons-logging-1.1.jar
> jstl-1.2.jar
> myfaces-api-1.2.0.jar
> myfaces-impl-1.2.0.jar
> standard-1.1.2.jar


RE: Unable to convert String (Faces 1.2)

Posted by Thomas Fischer <fi...@seitenbau.net>.
Hi andreas,

you forgot the f:view tags around your page.

     Thomas
"Andreas Kramer" <al...@gmx.li> schrieb am 16.10.2007 18:09:38:

> Hi
>
> I got the following problem:
>
> When opening a very simple jsp page just containing an <h:outputText
value=”test”/>.
> I receive the following error:
>
> exception
> javax.servlet.ServletException: Unable to convert string "test" to class
> "javax.el.ValueExpression" for attribute "value": Property Editor not
> registered with the PropertyEditorManager
>         javax.faces.webapp.FacesServlet.service(FacesServlet.java:152)
> root cause
> javax.faces.FacesException: Unable to convert string "test" to class
"javax.
> el.ValueExpression" for attribute "value": Property Editor not registered
with
> the PropertyEditorManager
>         org.apache.myfaces.context.servlet.ServletExternalContextImpl.
> dispatch(ServletExternalContextImpl.java:340)
>         org.apache.myfaces.application.jsp.JspViewHandlerImpl.
> renderView(JspViewHandlerImpl.java:254)
>         org.apache.myfaces.lifecycle.RenderResponseExecutor.
> execute(RenderResponseExecutor.java:41)
>
org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:132)
>         javax.faces.webapp.FacesServlet.service(FacesServlet.java:138)
>
>
> My setup:
>
> Myfaces 1.2.0
> Tomahawk 6.014
> Eclipse WTP 3.3
> JDK 6
>
> Page:
> <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
>     pageEncoding="ISO-8859-1"%>
> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.
> org/TR/html4/loose.dtd">
> <html>
> <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
> <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
>
>
> <head>
> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
> <title>Insert title here</title>
> </head>
> <body>
>       <h:outputText value="test"/>
>
> </body>
> </html>
>
> Web.xml:
> <?xml version="1.0" encoding="UTF-8"?>
> <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http:
> //java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.
> com/xml/ns/javaee/web-app_2_5.xsd"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
> http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID"
version="2.5">
>   <display-name>JSF2</display-name>
>   <welcome-file-list>
>     <welcome-file>index.html</welcome-file>
>     <welcome-file>index.htm</welcome-file>
>     <welcome-file>index.jsp</welcome-file>
>     <welcome-file>default.html</welcome-file>
>     <welcome-file>default.htm</welcome-file>
>     <welcome-file>default.jsp</welcome-file>
>   </welcome-file-list>
>   <servlet>
>     <servlet-name>Faces Servlet</servlet-name>
>     <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
>     <load-on-startup>1</load-on-startup>
>   </servlet>
>   <servlet-mapping>
>     <servlet-name>Faces Servlet</servlet-name>
>     <url-pattern>/faces/*</url-pattern>
>   </servlet-mapping>
> </web-app>
>
> Faces-config.xml
>
> <?xml version="1.0" encoding="UTF-8"?>
>
> <faces-config
>     xmlns="http://java.sun.com/xml/ns/javaee"
>     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>     xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.
> com/xml/ns/javaee/web-facesconfig_1_2.xsd"
>     version="1.2">
>
> </faces-config>
>
> WEB-INF/lib:
>
> commons-beanutils-1.7.0.jar
> commons-codec-1.3.jar
> commons-collections-3.2.jar
> commons-digester-1.8.jar
> commons-discovery-0.4.jar
> commons-logging-1.1.jar
> jstl-1.2.jar
> myfaces-api-1.2.0.jar
> myfaces-impl-1.2.0.jar
> standard-1.1.2.jar