You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Bowsher, Jason P" <j....@ic.ac.uk> on 2003/01/02 11:40:39 UTC

Tomcat configuration? Unable to find packages or classes

Hello, I am having trouble getting Tomcat to find my class and jar files
when compiling custom jsp pages (Tomcat examples work fine).  Having spent a
week or so looking at this I am hoping someone can help or point me in the
right direction.  I get the following error from
http://me.mydomain.com:8080/MyPage.jsp

java:50: cannot resolve symbol 
symbol : class MyClass location: class org.apache.jsp.MyPage_jsp 
MyClass adb = new MyClass(); 

Regards Jason
________________________________________
Setup:  
Redhat 7.1, Apache 1.3.27,  Tomcat 4.1.18, sdk 1.4.1_01, sdkee 1.3.1
___________________
Config:
I have the following virtual host defined in my server.xml:
<Host name="me.mydomain.com" appBase="~myhome/webdev/" debug="0"
unpackWARs="true">
<Logger className="org.apache.catalina.logger.FileLogger" directory="logs"
prefix="me." suffix=".log" timestamp="true"/>
<Context path="" docBase="ROOT" debug="0" reloadable="true"/>
</Host>
___________________
App:
I have the following jsp in ~myhome/webdev/ROOT with MyClass.class placed in
WEB_INF/classes (also tried with ajar in WEB_INF/lib and the class and jar
in variuos potential classpath and tomcat common directories);
<%@ page language="java" import ="java.util.Vector"%>
<!-- also tried with MyClass, MyClass.* in import statement -->
<html><head><title>MyPage.jsp</title><head>
<body>
<%MyClass adb = new MyClass();
if (adb.openConnection()!=null)
{ %> 
<%=adb.openConnection()%>
Connected
<% } else
{ %>
<%=adb.openConnection()%>
Not Connected
<% } %>
</body></html>
____________________________________
Have also tried moving the entire app tree to the $CATALINA_HOME/webapp
directory and copied $CATALINA_HOME/webapp/examples to ~myhome/webdev/ROOT
(they don't work their).








--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>