I'm learning to use servlets using Netbeans7 and Tomcat6 on a linux machine(Ubuntu 10.10). I have created a user in tomcat with manager,admin,tomcat and role1 roles. I added the Java EE 6 API library in my default project in netbeans and wrote the code for simple "hello world" servlet. Now I have book that suggests copying the compiled .class file to the folder which contains the class files for other default examples and then use it's address as URL in a html file. I found that by default I don't have the permission to do so. That leads me to suspect that this is not the right way of going about it. What is the correct method?
I have configured netbeans to use tomcat and I'm not getting any compilation errors.
Also, are the examples that came with Tomcat different from the sample programs in Netbeans. If yes, how do I run the sample servlets provided in netbeans? Right clicking and selecting "run file" givesFAIL - Application already exists at path /