• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Can't see other classes inside package??

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi-
Thanks in advance for the help here. I have a web app with a number of classes in a package. I can instantiate a new object (system classes) from any of these classes no problem assuming I use the appropriate import statements. The problem arises when I try to create an object from one of the classes in the same package. It can't see them. I'm able to do it from my JSP pages calling the exact same classes, they just can't see each other from inside the package. Does the package need to be added to the classpath? and if it does then why do my jsp pages have no problem seeing the classes? I am running Tomcat 4.0. Is there a setting that needs to be set in the web.xml? I am a little mystified.
Scott Farran
SCJP
 
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This does sound like a CLASSPATH/import issue.
I can instantiate a new object (system classes) from any of these classes no problem assuming I use the appropriate import statements.
What does this mean? What is system classes?
If your classes are defined to be in some package, then you do need to import them or fully qualify the class locations when you use them. And the parent directory of the package folder structure does need to be locatable in the CLASSPATH setting (and by the application server).
[ June 21, 2003: Message edited by: Dirk Schreckmann ]
 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi scott :
please check whether current directory is there in your %CLASSPATH% .
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic