Your first problem is that you didn't declare UserNameBean as a @ManagedBean. You can do this with the annotation or in a faces-config.xml. Your EL is probably wrong as well. If you use the annotation then by default the proper EL expression will be #{userNameBean.userName}

Second, you can use JSF 1.2 without adding jboss-deployment-structure.xml. All you need to do is add this to your web.xml: