Servlet development using Eclipse and Tomcat
Why Stack Overflow recommends it
Stack Overflow users link it when newcomers need a quick, concrete walkthrough of wiring Tomcat into Eclipse and getting a first servlet running.
Recommended by 5 people across 8 different months, 2010 to 2013.
What it is
A roughly four-minute beginner screencast by Vinod Videos showing how to configure Apache Tomcat inside Eclipse and then build and run a dynamic web application with a simple Servlet. It was recorded in 2009 with an older Eclipse release (Ganymede).
What people said
Recommends BalusC · 2010-02 · Stack Overflow · on “Eclipse Java EE IDE not supporting javax.servlet package”
You need to integrate a servlet container in Eclipse and associate it with your Dynamic Web Project . Eclipse doesn't ship with a servlet container by default. You need to download and install it separately. A widely used one is Apache Tomcat [LINK] . Just download the ZIP [LINK] and extract it somewhere. Then in Eclipse, go to the Servers view in the box at the right bottom. Then Add a new server where in you choose Apache Tomcat 6 from the list and point the Tomcat root folder (there where you extracted it). Then you can select it from the Target Runtime dropdown during the Dynamic Web Project creation wizard. Or if you already have created one but didn't associate it with a server, then m
Recommends BalusC · 2010-02 · Stack Overflow · on “Dev server for Java, like VS has for .NET?”
Tomcat [LINK] actually isn't a fullblown appserver. It's just a servlet container (i.e. implementing only web component of the (indeed huge) Java EE API) It's only around 6MB [LINK] big. Glassfish [LINK] , JBossAS [LINK] , Weblogic [LINK] and Websphere [LINK] as being full Java EE API implementations may be called as "fullblown appservers". You can also consider Eclipse Jetty [LINK] . It has a small footprint (download is only 2.2MB [LINK] ) and is useable as an embedded server and even runnable from a plain vanilla Java class [LINK] . As to IDE's, both Tomcat and Jetty are by default supported in " Eclipse for Java EE developers [LINK] ". You can easily integrate them in Servers view and th
Recommends BalusC · 2010-02 · Stack Overflow · on “My First Tomcat Servlet”
There [LINK] are [LINK] several [LINK] video [LINK] tutorials [LINK] at [LINK] [LINK] . Particularly this one [this video] is pretty good to get started. You only need to have JDK6 downloaded and installed [LINK] and Eclipse for Java EE developers [LINK] and Apache Tomcat 6.0 [LINK] downloaded and unzipped.
Recommends Tommy · 2010-07 · Stack Overflow · on “Apache Tomcat Not Showing in Eclipse Server Runtime Environments”
You may get more success if you do a "search" for the runtime env from the preferences screen instead of hitting "add" - see this demo on youtube. [this video] - When you hit search, you are prompted to point to the tomcat directory and then it SHOULD add it as a server runtime environment. Unfortunately for me, that is not the case (I get "no new server runtime environments were found") But you might have more success.
Recommends Dave · 2011-04 · Stack Overflow · on “HTML getting data from and to servlet (School Project Question)”
While GWT is a great library; I think its overkill for what you're looking for. Here is a youtube video I always default to when I need to get a review on how to set up a quick tomcat instance [this video] . It is using an older version of eclipse, and while some of the menu options are slightly different you should be able to figure it out. If you see something in the video and you can't figure it out in the newer version of eclipse, just let me know what time in the video you're getting lost at and I'll post how to do it in the helios (the newer version of Eclipse). Also, this video uses Tomcat which is a servlet container. I'd go ahead and use Tomcat 7, which uses servlets 3.0. If your assignm
Recommends Dave · 2011-04 · Stack Overflow · on “Java set up to handle ajax requests only”
I think you might be too quick to dismiss the "bloated-frameworks". What you're trying to do is implement - at the bare minimum - something capable of receiving, understanding, and responding to http GET requests using JSON for your message passing. While this can be done using code completely native to your run of the mill jdk, you would probably end up writing far more code to accomplish this, than you would if you would follow a quick tutorial on Tomcat or Jetty. That is what I'm guessing the purpose of @jcm's comment was. But if you really want to just get this done and not think about it, all you really need to do is follow a tutorial like this one: [this video] The video is using tomcat and
Recommends Dave · 2011-04 · Stack Overflow · on “How to talk to Tomcat server from a PHP application”
There are two things your going to need to study. [LINK] This is a tutorial on using the XHR object from php. You should go through that. Also, if you aren't familiar with the XHR object, I would read this as well: [LINK] You're going to have to create a servlet capable of responding to these requests. There are various tutorials on how to create a servlet. Here is a link to a youtube video I fall back on when I forget how to do servlets: [this video] In the video, he just uses straight up javascript; so you're php code is going to be doing what the javascript did in the video (item 1 on my list). The video uses an older version of eclipse (I think ganymede), but it is pretty close to the same pr
Recommends adrian7 · 2011-06 · Stack Overflow · on “How can I see the new web application option in Eclipse”
To program servlets you need Eclipse for Java EE developers, and DON'T forget a server like Apache Tomcat, or Glassfish, which I guess are not included with the original package of eclipse. Personally I have manage to install Tomcat separately from Eclipse and then link it with the IDE. There are plenty of tutorials on youtube: [LINK] [this video]
Recommends Dave · 2011-08 · Stack Overflow · on “How to create Web Services in Java (with Eclipse)”
If you're still interested in giving Tomcat a shot, here is a tutorial on youtube of making a very basic "Hello world" example using Eclipse. It leaves a lot to learn; but it looks like it will at least get you started. FYI, the version of Eclipse used is slightly outdated. So some of the menu options may not be exactly the same: [this video] Also, the meaning of "Web Service" can be subjective. So, to be specific; this just shows you how to get a basic HTTP endpoint started on your local machine.
Recommends Dave · 2011-10 · Stack Overflow · on “Tomcat setup issues”
If you're getting a 404 - that means the web server is running. This likely means you don't have anything mapped to the path specified (no servlets/default web page/etc). Either make a servlet and add it to your web.xml or define a home page html file. FYI, if you use the "Dynamic Web Project" setup; most of this is done for you. Here is a youtube video I always default to when I need to get a review on how to set up a quick tomcat instance in eclipse [this video] .