This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes IDEs, Version Control and other tools and the fly likes Adding Classes in Netbeans Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "Adding Classes in Netbeans" Watch "Adding Classes in Netbeans" New topic
Author

Adding Classes in Netbeans

Sean Casey
Ranch Hand

Joined: Dec 16, 2000
Posts: 625
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

Joined: Jan 06, 2004
Posts: 13
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?


alexis
Sean Casey
Ranch Hand

Joined: Dec 16, 2000
Posts: 625
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?
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Adding Classes in Netbeans
 
Similar Threads
NetBeans IDE
JSP and DB
Can't access/call class/method in java class which is compile by using netbeans
Jsp and location of JavaBeans
card layout in netbeans