• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Adding Classes in Netbeans

 
Sean Casey
Ranch Hand
Posts: 625
  • Mark post as helpful
  • send pies
  • 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?
 
Alexis Sumalpong
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • 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
  • 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?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic