Tomcat and Beans

I am new to tomcat. I am trying to write a jsp page that will use a JavaBean to check the user name and password of a user against a database to see if access should be denied or granted. I have compiled the Bean I wrote and placed it in the Web-inf/classes folder, put I get the following error when I open my jsp file: -

org.apache.jasper.JasperException: Unable to compile class for JSPH:\jakarta-tomcat-3.2.3\jakarta-tomcat-3.2.3\work\localhost_8080%2Fexamples\_0002fjsp_0002fSherif_0002fsherif_0002ejspsherif_jsp_5.java:63: Class jsp.Sheri_00025.Security not found.

Security It = null;

^

H:\jakarta-tomcat-3.2.3\jakarta-tomcat-3.2.3\work\localhost_8080%2Fexamples\_0002fjsp_0002fSherif_0002fsherif_0002ejspsherif_jsp_5.java:66: Class jsp.Sheri_00025.Security not found.

It= (Security)

^

H:\jakarta-tomcat-3.2.3\jakarta-tomcat-3.2.3\work\localhost_8080%2Fexamples\_0002fjsp_0002fSherif_0002fsherif_0002ejspsherif_jsp_5.java:71: Class jsp.Sheri_00025.Security not found.

It = (Security) Beans.instantiate(this.getClass().getClassLoader(), "Security");

^

3 errors

at org.apache.jasper.compiler.Compiler.compile(Compiler.java, Compiled Code)

at org.apache.jasper.servlet.JspServlet.doLoadJSP(JspServlet.java:612)

at org.apache.jasper.servlet.JasperLoader12.loadJSP(JasperLoader12.java:146)

at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:542)

at org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspServlet.java:258)

at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:268)

at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:429)

at org.apache.jasper.servlet.JspServlet.service(JspServlet.java, Compiled Code)

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, Compiled Code)

at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java, Compiled Code)

at java.lang.Thread.run(Thread.java:479

The name of my Bean is Security

[2673 byte] By [tomcat_III] at [2007-9-26 2:13:17]
# 1
is your tomcat working fine with all the examples and so.. if yes then just go through the source code and also follow some good book on jsp. how you are instantiating your bean ?, hope you are following <jsp:useBean> and so.. , standardshave a nice day
simmy1 at 2007-6-29 9:07:40 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2
hi i think u havnt put the folder structure rightunder webappshave ur own folder (here ur jsp file should be placed)under this u shuold have Web-Infinder which u should have classes folder in which u should place ur class filehope this helps u
rameshinjava at 2007-6-29 9:07:40 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 3
Thanks, I will try out your suggestion.
tomcat_III at 2007-6-29 9:07:40 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...