aspose file tools*
The moose likes IDEs, Version Control and other tools and the fly likes How to run servlet program in eclipse Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "How to run servlet program in eclipse" Watch "How to run servlet program in eclipse" New topic
Author

How to run servlet program in eclipse

Raghu ram
Ranch Hand

Joined: Oct 19, 2007
Posts: 34
Hello Frnds,

Anybody tell me to run the servlet program in eclipse IDE. What are the files should be downloaded and tell me what are the steps to import tomcat web container into eclipse.
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30537
    
150

Raghu,
Did you download the Tomcat Eclipse plugin yet?


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Muhammad Saifuddin
Ranch Hand

Joined: Dec 06, 2005
Posts: 1321

here is on http://openknows.free.fr/


Saifuddin..
[Blog][Linkedin] How To Ask Questions On JavaRanch My OpenSource
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14156
    
  19

You don't need a special third-party plug-in for Eclipse to be able to control Tomcat from Eclipse.

Just install the Eclipse Java EE tools. You can do this using the update manager in Eclipse: Select Help / Software Updates / Find and Install, then choose "Search for new features to install" and click Next. Select "Europa Discovery Site" (for Eclipse 3.3) or "Callisto Discovery Site (for Eclipse 3.2) and click Finish. Eclipse starts searching for updates. You might need to select a mirror site. Choose one that is close to you.

When it's done searching, look in the list of updates and select J2EE Standard Tools (JST) and Web Standard Tools (WST). You might need to click "Select Required". Then click Finish and let Eclipse download and install the updates.

Note that instead of installing JST and WST through the update manager, you can also download the Eclipse IDE with those things pre-installed. Just download "Eclipse IDE for Java EE developers" from the Eclipse download page.

After installing and restarting Eclipse, select Window / Preferences. In the tree on the left choose Server / Installed Runtimes. On the right click the "Add" button, then select Apache / Apache Tomcat 6.0 (or a different version, depending on which Tomcat you are using). Click Next, and select the directory where you have Tomcat installed. Finally, click Finish and OK to close the preferences window.

Now you can make a Java EE project. Select File / New / Project... In the New Project selection window, choose Web / Dynamic Web Project. Enter the details for your project and let Eclipse create the new project.

After creating some JSPs in the WebContent directory of your project, right-click the project and select Run As / Run on Server. Select your Tomcat and click Finish. Eclipse now starts Tomcat and opens a browser inside Eclipse that points at the running Tomcat.


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: How to run servlet program in eclipse