• 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

Adding Classes in Netbeans

 
Ranch Hand
Posts: 625
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,
I'm having trouble with class not found exceptions in netbeans. I can set up a project with servlets and jsp's fine, but when I create another class and then create a new object of that class inside a jsp, I get a class not found exception. Where do I add these plain java classes so that the jsp will find them on compilation?
 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Use "Likha Devcentre" to compile.
Put your JavaBeans in the proper package in /classes
Put you JSP file somewhere in /src
Then compile your JSP

Originally posted by Sean Casey:
hi,
I'm having trouble with class not found exceptions in netbeans. I can set up a project with servlets and jsp's fine, but when I create another class and then create a new object of that class inside a jsp, I get a class not found exception. Where do I add these plain java classes so that the jsp will find them on compilation?

 
Sean Casey
Ranch Hand
Posts: 625
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm still getting an error. Maybe I should mention this in detail:
I created a web module and under classes I have a class Tester that just contains a no-arg constructor. Outside of that directory I have a jsp called test.jsp. In the middle of the jsp I have a scriptlet like the following:

I compile the Tester class with no problems, but when I try to compile the jsp I get the following error:

Anyone know what I'm doing wrong?
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic