Originally posted by hany hashemi: Whenever i put it in a default root (in src) my program run successfully. Since i put it in to a seperate package i force with this error:
Maybe you didn't put it in the classpath the right way.
I see a capital in your package name, phoneBook. This is unusual in Java, where package names ought to be all lowercase. Verify if anything is right, Java is case sensitive.
If that isn't the problem, then you need to make sure that the folder structure where the class is been put in conforms the package name. I.e. the class must be located at /WEB-INF/classes/phoneBook/service/ControllerServlet.class.
hi, thanks for your help. this is a url for accessing my page: "http://localhost:8080/control"
I put my file in this location: web/src/phoneBook/service
Is it wrong location???!! thanks for helping me Hany
Joined: Dec 17, 2008
hi again, I should thank you alot ,i changed the capital letter in package name in to small one and it is working now. you save me some time...:-)
Joined: Oct 08, 2006
One comment though:
Originally posted by hany hashemi: I put my file in this location: web/src/phoneBook/service
Was you talking about the .java file or the .class file? I was talking about the compiled .class file. It would explain things if you was using an IDE and didn't understood how it works "under the hood". The folder name "/src" is commonly used in IDE's to store the project's raw Java files in. You can find the compiled .class files in the "/build" folder or something straightforward like that.