My XHTML :
<!
DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><
html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui=
"http://java.sun.com/jsf/facelets"
xmlns:h=
"http://java.sun.com/jsf/html"
xmlns:f=
"http://java.sun.com/jsf/core"
xmlns:rich=
"http://richfaces.org/rich"
xmlns:a4j=
"http://richfaces.org/a4j"
xmlns:ufn="http://boeing.com/jsf/functions"
>
<h:head></h:head>
<body>
<h:form id="index">
<h:inputText value = "#{TestingBean.nameText}" id="Inp1"/>
<a4j:commandButton action = "#{TestingBean.fillTextName}" value = "Hitme" id="cmdbut1" rendered="true"/>
</h:form>
</body>
</html>
My 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>checkWeb</display-name>
<welcome-file-list>
<welcome-file>index.xhtml</welcome-file>
</welcome-file-list>
<servlet>
<display-name>FacesServlet</display-name>
<servlet-name>FacesServlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>FacesServlet</servlet-name>
<url-pattern>*.xhtml</url-pattern>
</servlet-mapping>
Faces-config
<?
xml version="1.0" encoding="UTF-8"?><
faces-config version="2.0" xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xi="http://www.w3.org/2001/XInclude" 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_2_0.xsd"
>
</
faces-config>
ManagedBean
package
com;
import
java.io.Serializable;
import
javax.faces.bean.ManagedBean;
import
javax.faces.bean.SessionScoped;
@ManagedBean
(name="TestingBean")
@SessionScoped
public
class TestingBean implements Serializable{
/***
*/
private static final long serialVersionUID = 1L;
public String nameText = null;
public String fillTextName(){System.
out.print(nameText);
return "welcome";}
public String getNameText() {
return nameText;}
public void setNameText(String nameText) {
this.nameText = nameText;}
}