File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Tomcat and the fly likes No access to classes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "No access to classes" Watch "No access to classes" New topic

No access to classes

Dave Berkheimer

Joined: Feb 05, 2001
Posts: 26

I'm running Tomcat 5.5.12 and I'm having issues when attempting to instantiate my own classes.

My source is located in c:\testapps. Jsp's are working just fine. My class is in the usual, c:\testapps\WEB-INF\classes. My CLASSPATH includes the pre-stated path to the class. The class in question (SiteParams.class) fails on this line...

SiteParams sp = new SiteParams();

The error message is as follows:

"SiteParams cannot be resolved to a type"

by the way, this class has worked fine in other hosting environments. This is the first time that I've set up Tomcat locally.

Any ideas as to what I'm missing?


Sun Certified Java Programmer
Ben Souther

Joined: Dec 11, 2004
Posts: 13410

Is your class in a package?

Thee has been a tightning of the spec for JREs starting with version 1.4.1.
Starting with this version, you can't import a non-packged class (default package) from a packaged one.

Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
I agree. Here's the link:
subject: No access to classes
It's not a secret anymore!