File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSF and the fly likes ServeletException, PropertyNnotFoundException Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "ServeletException, PropertyNnotFoundException" Watch "ServeletException, PropertyNnotFoundException" New topic

ServeletException, PropertyNnotFoundException

t kk

Joined: May 19, 2005
Posts: 5
hi all
when I try to run my jsf application I get following error,
javax.servlet.ServletException error testing property 'msg' in bean of type null.

<%@ taglib uri="" prefix="h" %>
<%@ taglib uri="" prefix="f" %>

<f:loadBundle basename="bundle.Messages" var="Message"/>

<head> <title>Welcome Page</title> </head>

<h utputText value="Input Your Message" />
<h:inputText value="#{hiberBean.msg}" id="myMsg1"/>
<h:commandButton value="Save" action="#{hiberBean.saveMsg}" />


package messagebean;
import net.sf.hibernate.*;
import net.sf.hibernate.cfg.*;
public class HiberBean
private String msg;

public void setMsg(String msg)
this.msg = msg;

public String getMsg()
return this.msg;

public String saveMsg()

return "finish";


here are my jsf and beans , bean entry is made in faces-config.xml
Please advise
Marius Cloete

Joined: Apr 14, 2005
Posts: 10
hi hope this works

In your bean initialize var "msg" to private String msg = "";

If the compiler ain't happy then no body is....<br /> <br />SCJP 1.4
Varun Khanna
Ranch Hand

Joined: May 30, 2002
Posts: 1400
See my reply here.

- Varun
I agree. Here's the link:
subject: ServeletException, PropertyNnotFoundException
It's not a secret anymore!