It's not a secret anymore!
The moose likes JSF and the fly likes JSF Issue Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "JSF Issue" Watch "JSF Issue" New topic

JSF Issue

shubhranshu swain

Joined: Dec 14, 2010
Posts: 3

I am new to jsf. I have a jsf page as below.

<h:selectOneMenu binding="#{commonBeans.htmlSelectOneMenu}">
<f:selectItem itemValue="human" itemLabel="HUMAN"/>
<f:selectItem itemValue="yeast" itemLabel="YEAST"/>
<f:selectItem itemValue="worm" itemLabel="WORM"/>
<f:selectItem itemValue="fly" itemLabel="FLY"/>
<f:selectItem itemValue="mouse" itemLabel="MOUSE" />

It runs fine on my system. But on client machine it shows
"org.apache.jasper.el.JspELException: /CHDIHomeSearch.jsp(65,2) '#{commonBeans.htmlSelectOneMenu}' Cannot convert #{commonBeans.htmlSelectOneMenu} of type class java.lang.String to class javax.faces.component.UIComponent"

here is my bean class
public class CommonBeans{
private HtmlSelectOneMenu htmlSelectOneMenu = new HtmlSelectOneMenu();
public HtmlSelectOneMenu getHtmlSelectOneMenu() {
return htmlSelectOneMenu;

public void setHtmlSelectOneMenu(HtmlSelectOneMenu htmlSelectOneMenu) {
this.htmlSelectOneMenu = htmlSelectOneMenu;


dont know how to deal with this.

shubhranshu swain

Joined: Dec 14, 2010
Posts: 3

We have solved the issue. Actually, we have been constantly developing the application in java 1.6 but the client's machine have java 1.5.
I agree. Here's the link:
subject: JSF Issue
It's not a secret anymore!