System Information:
OS: Ubuntu 11.10
Server: Tomcat 7.0
JVM: openjdk 1.6

I have checked if the server is running by going to http://localhost:8080. It's working fine. I just need to know the directory in which I should save my servlet in order to run it.

I think I am supposed to save it in the "Examples" folder but I don't know where it is located.

Three options:
A) TOMCAT_DIRECTORY/webapps/YOUR_PROJECT_DIRECTORY
B) TOMCAT_DIRECTORY/webapps/ROOT (usually used if only one application run from server and admin has no experience with configuration)
C) anywhere you wish for as long you do necessary changes to your configuration (example to have project directory that wouldn't get deleted/affected by server version changes. directory will stand alone and not be part of Tomcat folder structure)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.