aspose file tools
The moose likes JSF and the fly likes Conversion Error setting value Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Badass: Making Users Awesome this week in the Game Development forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Conversion Error setting value" Watch "Conversion Error setting value" New topic

Conversion Error setting value

suneel kumar
Ranch Hand

Joined: Jan 08, 2007
Posts: 46
my JSP code is

<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
The taglib directive below imports the JSTL library. If you uncomment it,
you must also add the JSTL library to the project. The Add Library... action
on Libraries node in Projects view can be used to add the JSTL 1.1 library.
<%@ taglib prefix="f" uri="" %>
<%@ taglib prefix="h" uri="" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Person Information</title>

<h1>Person Information</h1>
<h:form binding="#{UserBean.form1}" id="form1" >
<p> Name : <h:inputText value="#{}" /></p>
<p> Birthday : <h:inputText value="#{UserBean.birthday}" /></p>

<h:commandButton value="commandButton1"

action="#{UserBean.commandButton1_action}" />


MY BEAN code is

* Created on April 20, 2007, 2:43 PM
* To change this template, choose Tools | Template Manager
* and open the template in the editor.

package astrologer.user;
import javax.faces.component.html.HtmlCommandButton;
import javax.faces.component.html.HtmlForm;
import javax.faces.component.html.HtmlInputText;

* @author suneelkumarr
public class UserBean {

/** Creates a new instance of UserBean */
public UserBean() {

// private String name;
// private String birthday;
// private String email;

private HtmlForm form1;
private HtmlInputText name;
private HtmlInputText birthday;
private HtmlCommandButton commandButton1;

public void setForm1(HtmlForm form1) {
this.form1 = form1;

public HtmlInputText getName() {
return name;

public void setName(HtmlInputText name) { = name;

public HtmlInputText getBirthday() {
return birthday;

public void setBirthday(HtmlInputText birthday) {
this.birthday = birthday;

public HtmlCommandButton getCommandButton1() {
return commandButton1;

public void setCommandButton1(HtmlCommandButton commandButton1) {
this.commandButton1 = commandButton1;
public String commandButton1_action(){
String user=(String)name.getValue();
String pass=(String)birthday.getValue();
String temp;
System.out.println("**** In side commandButton() ");
//return "success";
return temp;
// return "failure";
return temp;

When i am running this program i am getting the error like conversion value to null.
I agree. Here's the link:
subject: Conversion Error setting value