File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSF and the fly likes unable to instantiate class- problem with drop down Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » JSF
Reply Bookmark "unable to instantiate class- problem with drop down" Watch "unable to instantiate class- problem with drop down" New topic
Author

unable to instantiate class- problem with drop down

srinivas srini
Greenhorn

Joined: Feb 03, 2004
Posts: 23
Hi,
I am using jsf 1.1
I am trying to populate a simple drop down in MyJsp.jsp with the List values generated in ContactsListBean.java. I am copying the code here for reference.
when I launch the page (forwarding to this MyJsp.jsp in index.jsp) I am getting this error below. Can anyone help me out what is it that I am doing wrong?? I am unable to trace out what's wrong. I have even tried the same logic with h:selectOneListbox also but I get the same error..
Any help/advice would be highly appreciated, Thanks in advance.

org.apache.jasper.JasperException: javax.servlet.jsp.JspException: javax.faces.FacesException: javax.faces.FacesException: Can't instantiate class: ''.
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:460)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:355)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:322)
com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:147)
com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:686)
org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:656)
org.apache.jsp.index_jsp._jspService(index_jsp.java:71)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)


MyJsp.jsp





ContactsListBean.java




faces-config.xml




web.xml

Bauke Scholtz
Ranch Hand

Joined: Oct 08, 2006
Posts: 2458
Crossposted and already answered: http://forums.sun.com/thread.jspa?threadID=5326738

In the future please kindly mention about crossposting before others discover that you're wasting their time.

The answer is: always put classes in a package and in your specific case, get rid of those managed properties. Those makes no sense.
[ August 27, 2008: Message edited by: Bauke Scholtz ]

Code depot of a Java EE / JSF developer | JSF / Eclipse / Tomcat kickoff tutorial | DAO kickoff tutorial | I ♥ Unicode
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: unable to instantiate class- problem with drop down
 
Similar Threads
JSF Navigation Issue
"#{...} is not allowed in template text" error
Something missing with dynamic faces (Ajax) simple example
404-tried everything
Argument Error: One or more parameters are null.