javax.servlet.ServletException: Cannot create bean of class...
anand chawla
Ranch Hand
Joined: Oct 19, 2000
Posts: 91
posted
0
hi Guys I m working on Tomcat server 3.2.3 I have my jsp files stored at following path:- C:\jakarta-tomcat-3.2.3\webapps\examples\jsp\anand and my beans are stored at following path C:\jakarta-tomcat-3.2.3\webapps\examples\WEB-INF\classes\projsp when i run the file i get the error ServletException: Cannot create bean of class... why does this happen my jsp file is as follows <html> <title>Browse the Catalog</title> <body> <%@ page language="java" import="projsp.*" %> <jsp:useBean id="Item" class="projsp.Item" /> <table> <tr> <td>Item Description<td>Price<td>Quantity in Hand </tr> <%
why is this happening please help its so confusing
Marcos Maia
Ranch Hand
Joined: Jan 06, 2001
Posts: 977
posted
0
Problably some error in your bean. Remember that a bean must have an empty constructor(i.e- you can�t create a constructor that receives parameters for your bean).
anand chawla
Ranch Hand
Joined: Oct 19, 2000
Posts: 91
posted
0
Hey Pls help me out with this proble,.. Ther is nothing wrong with my bean or class. pls anyone out ther...why do we get this error all you jave gurus where are u...i m stuck.
Could you include more of the error message? There may be a hint there.
Customer surveys are for companies who didn't pay proper attention to begin with.
anand chawla
Ranch Hand
Joined: Oct 19, 2000
Posts: 91
posted
0
this is the error i am getting please help........... javax.servlet.ServletException: Cannot create bean of class Item at jsp.anand._0002fjsp_0002fanand_0002fdispord_0002ejspdispord_jsp_15._jspService(_0002fjsp_0002fanand_0002fdispord_0002ejspdispord_jsp_15.java:77) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.servlet.JspServlet$JspCountedServlet.service(JspServlet.java:130) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:282) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:429) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:500) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405) at org.apache.tomcat.core.Handler.service(Handler.java:287) at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372) at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:812) at org.apache.tomcat.core.ContextManager.service(ContextManager.java:758) at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:213) at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416) at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501) at java.lang.Thread.run(Thread.java:484)