Tomcat sets it's own classpath.  You add your classes by placing them in
the specified directories.

This should get you started:
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/appdev/index.html

This page has the specifics on classloading:
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/class-loader-howto.html




On Wed, 2004-09-29 at 14:29, [EMAIL PROTECTED] wrote:
> Hi iÂm begginer in Tomcat and Java and iÂve a problem.
> I try run a JSP , but the next error appear, some one know the reasons?
> The JSP use a simple class, when i run the example by shell (only for 
> test) all itÂs OK, but when the JSP call the Class i get the Error.
> My classPath itÂs ok, iÂve review it.
> Thanks.
> ype Exception report
> message 
> description The server encountered an internal error () that prevented it 
> from fulfilling this request.
> exception 
> org.apache.jasper.JasperException: Unable to compile class for JSP
> 
> An error occurred at line: 3 in the jsp file: /Example.jsp
> 
> Generated servlet error:
>     [javac] Compiling 1 source file
> 
> /opt/jakarta-tomcat-5.0.19/work/Catalina/localhost/Mysql-conn/org/apache/jsp/Example_jsp.java:55:
>  
> cannot resolve symbol
> symbol  : class clsDisplayHtml 
> location: class org.apache.jsp.Example_jsp
>                  clsDisplayHtml m_ClsDisplayHTML = new 
> clsDisplayHtml(m_StrAppName, m_StrWebMEmail, m_StrWebMName, 
> m_StrPageTitle);
>         ^
> 
> 
> 
> An error occurred at line: 3 in the jsp file: /Example.jsp
> 
> Generated servlet error:
> /opt/jakarta-tomcat-5.0.19/work/Catalina/localhost/Mysql-conn/org/apache/jsp/Example_jsp.java:55:
>  
> cannot resolve symbol
> symbol  : class clsDisplayHtml 
> location: class org.apache.jsp.Example_jsp
>                  clsDisplayHtml m_ClsDisplayHTML = new 
> clsDisplayHtml(m_StrAppName, m_StrWebMEmail, m_StrWebMName, 
> m_StrPageTitle);
>                                               ^
> 
> 
> 
> An error occurred at line: 3 in the jsp file: /Example.jsp
> 
> Generated servlet error:
> /opt/jakarta-tomcat-5.0.19/work/Catalina/localhost/Mysql-conn/org/apache/jsp/Example_jsp.java:60:
>  
> cannot resolve symbol
> symbol  : class clsReadProps 
> location: class org.apache.jsp.Example_jsp
>                  clsReadProps m_ClsProperties = new 
> clsReadProps("mysql.properties");
>         ^
> 
> 
> 
> An error occurred at line: 3 in the jsp file: /Example.jsp
> 
> Generated servlet error:
> /opt/jakarta-tomcat-5.0.19/work/Catalina/localhost/Mysql-conn/org/apache/jsp/Example_jsp.java:60:
>  
> cannot resolve symbol
> symbol  : class clsReadProps 
> location: class org.apache.jsp.Example_jsp
>                  clsReadProps m_ClsProperties = new 
> clsReadProps("mysql.properties");
>                                            ^
> 
> 
> 
> An error occurred at line: 3 in the jsp file: /Example.jsp
> 
> Generated servlet error:
> /opt/jakarta-tomcat-5.0.19/work/Catalina/localhost/Mysql-conn/org/apache/jsp/Example_jsp.java:65:
>  
> cannot resolve symbol
> symbol  : class clsDbBean 
> location: class org.apache.jsp.Example_jsp
>                  clsDbBean m_ClsDataBase = new clsDbBean(m_StrDriver, 
> m_StrUrl, m_StrUser, m_StrPass);
>         ^
> 
> 
> 
> An error occurred at line: 3 in the jsp file: /Example.jsp
> 
> Generated servlet error:
> /opt/jakarta-tomcat-5.0.19/work/Catalina/localhost/Mysql-conn/org/apache/jsp/Example_jsp.java:65:
>  
> cannot resolve symbol
> symbol  : class clsDbBean 
> location: class org.apache.jsp.Example_jsp
>                  clsDbBean m_ClsDataBase = new clsDbBean(m_StrDriver, 
> m_StrUrl, m_StrUser, m_StrPass);
>                                       ^
> 6 errors
> 
> 
>  
> org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:127)
>  
> org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:351)
>  org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:415)
>  org.apache.jasper.compiler.Compiler.compile(Compiler.java:458)
>  org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
>  
> org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:553)
>  
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:291)
>  org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
>  org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
>  javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
> 
> note The full stack trace of the root cause is available in the Tomcat 
> logs.
> 
> Apache Tomcat/5.0.19
> 
> ---------------------------------------------------------------------
> 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