*
The moose likes Servlets and the fly likes How to start and deploy a servlet on Tomcat 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 » Java » Servlets
Bookmark "How to start and deploy a servlet on Tomcat" Watch "How to start and deploy a servlet on Tomcat" New topic
Author

How to start and deploy a servlet on Tomcat

Sebastian Dan
Greenhorn

Joined: Aug 21, 2011
Posts: 3
Can someone please give a noob step by step instructions on how to start a servlet with Tomcat from the installing of Java sdk (and since we are here what sdk do I need for programming servlets, will Java SE will suffice or do I need Java EE?), installing Tomcat, configuring the environment variables ... all the way to testing and succesfully running the servlet.

Any material you will give me (links, tutorials, a post with step by step instructions etc.) will greatly be appreciated. Thank you in advance!
olivier dutranoit
Ranch Hand

Joined: Aug 20, 2011
Posts: 81

You will need java EE...and eclipse (or netbeans...)

Try googling "java ee tutorial tomcat"

you will find a lot of hits, for example this one :

http://www.javahotchocolate.com/wtp-tutorials/wtp-tutorial.html

explained from beginning to end...step by step...

Sebastian Dan
Greenhorn

Joined: Aug 21, 2011
Posts: 3
Thank you very much! I think this will help me a lot.
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12761
    
    5
If you are not already comfortable with an IDE such as NetBeans do NOT try to learn a new IDE at the same time as you learn servlets. It is tricky enough already.

Download the Tomcat server - you do NOT need a full JEE package. Install Tomcat as an application, NOT a service. Tomcat comes with the servlet-api.jar library you will need in addition to the standard Java library. Tomcat also comes with extensive documentation and a number of examples you will find very helpful.

Bill
Sebastian Dan
Greenhorn

Joined: Aug 21, 2011
Posts: 3
I'll take your advice into consideration and I will get my hands "dirty" by programming and deploying my first servlets the hard way but just for the sake of the discussion why my Eclipse IDE for Java EE Developers doesn't want to start and instead it gives me a message "Failed to create the Java Virtual Machine"? I have Java SE 1.6 installed and another version of Eclipse (but this other version is for standard Java, not EE) that works fine.
olivier dutranoit
Ranch Hand

Joined: Aug 20, 2011
Posts: 81

i think you will have to edit your eclipse.ini file to solve this problem. Could be something with the launcher settings...
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to start and deploy a servlet on Tomcat
 
Similar Threads
JRE install
Eclipse 2.0.1 - How do I compile / debug servlets
Commercial SCWCD preparation tool
Installing Tomcat
How to install tomcat5 in Ubuntu 11.04 when it is not in the apt-cache?