954,574 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

How to run servlets on Ubuntu

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.

slasherpunk
Newbie Poster
15 posts since Aug 2011
Reputation Points: 10
Solved Threads: 0
 

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)

peter_budo
Code tags enforcer
Moderator
15,436 posts since Dec 2004
Reputation Points: 2,806
Solved Threads: 902
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: