It's highly recommended that all classes be in packages. This may be your problem. Add 'package mycompany.myproject ;' to your class source, recompile, and then place the resulting .class file in WEB-INF/classes/mycompany/myproject. Restart your webapp and see if that resolves the issue.

--David

Divick Kishore wrote:

I am using Tomcat 5.5 and I am testing a very simple jsp deployed in tomcat.

I have a directory structure like this :

webapps/wm/test.jsp
webapps/WEB-INF/web.xml
webapps/WEB-INF/classes/DBTest.class

and when I access http://localhost:8080/wm/test.jsp , I get the following exception:

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

An error occurred at line: 7 in the jsp file: /test.jsp
Generated servlet error:
DBTest cannot be resolved to a type

An error occurred at line: 7 in the jsp file: /test.jsp
Generated servlet error:
DBTest cannot be resolved to a type

org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:510) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:375) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
   org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

Please help me figure out why Tomcat is unable to pick the class file.

Thanks,
Divick

---------------------------------------------------------------------
To start a new topic, e-mail: [email protected]
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To start a new topic, e-mail: [email protected]
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to