On Mon, Jan 07, 2002 at 10:43:08AM -0500, Michael Wentzel wrote:
> > I am using tomcat and i am unable to compile my servlet 
> > classes when i try
> > to make an instance of a class that i have created which lies 
> > in the same
> > folder as my servlet, ie WEB-INF/classes.  A error occurs 
> > telling me that it
> > cannot resolve the class.
> > 
> > The only way around this is to put these classes i need in 
> > the jre/classes
> > folder of my java home directory.
> > 
> > Does anybody know a way around this problem so that my 
> > servlets can 'see' my
> > java classes in the classes folder, or below.
> 
> Try doing an explicit import of the class.  i.e. if your class you want to
> instantiate is MyClass.class do the following in your servlet:
> 
> import MyClass;

Be aware that this code won't work in java 1.4.  1.4 requires explicit
package imports.  (they decided to get strict on that..)

-- 

Kirby Vandivort                      Theoretical Biophysics Group
Email: [EMAIL PROTECTED]          3051 Beckman Institute
http://www.ks.uiuc.edu/~kvandivo/    University of Illinois
Phone: (217) 244-5711                405 N. Mathews Ave
Fax  : (217) 244-6078                Urbana, IL  61801, USA

--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>

Reply via email to