This is really just a guess, but could it be your class isn't in a package? Try this:

1. Create the folder structure com/mycompany/mywebproject under WEB-INF/classes substituting in your company name and web project name where indicated.

2. place this line near the beginning of your java class source file: package com.mycompany.mywebproject ; Again, replace your company name and web site project name where indicated.

3. Recompile and place the resulting .class file in the WEB-INF/classes/com/mycompany/mywebproject folder created in 1.

4. Restart your webapp and try it.

--David

U K Laxmi wrote:

I have integrated tomcat 5.5 with apache 2
successfully and i could able to run sample JSPs. Now
i created a jsp page which will inititate a Java
program called TestSQLLoad.java. TestSQLLoad.java
talks to Ms Access database and gets me reuired fields
from databasae and it will be displayed on browser
thro' JSP page test-db.jsp. I'm using Netscape 7.2
browser. When i run test-db.jsp after running tomcat &
apache, it gives JasperException. It's saying -
"TestSQLLoad cannot be resolved or is not a type".

I created jar file with TestSQLLoad.java &
TestSQLLoad.class and put it in
TOMCAT_ROOT/webapps/web/WEB-INF/classes directory as
well as TOMCAT_ROOT/common/lib directories. Thinking
that class loader is unable to find the class, i put
the above directories in my class path as well. Where
i'm going wrong? What's happenning. Pls help.

Here is the exception that's displayed on the browser.

org.apache.jasper.JasperException: Unable to compile
class for JSP

An error occurred at line: 7 in the jsp file:
/JSP/test-db.jsp
Generated servlet error:
TestSQLLoad cannot be resolved or is not a type

An error occurred at line: 7 in the jsp file:
/JSP/test-db.jsp
Generated servlet error:
TestSQLLoad cannot be resolved or is not a type



org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:84)

org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:328)

org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:397)

org.apache.jasper.compiler.Compiler.compile(Compiler.java:288)

org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)

org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)

org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:556)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:296)

org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)

org.apache.jasper.servlet.JspServlet.service(JspServlet.java:245)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:802)



__________________________________ Do you Yahoo!? Meet the all-new My Yahoo! - Try it today! http://my.yahoo.com




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to