• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to run servlet program in eclipse

 
Raghu ram
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
author & internet detective
Marshal
Posts: 34851
369
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Raghu,
Did you download the Tomcat Eclipse plugin yet?
 
Muhammad Saifuddin
Ranch Hand
Posts: 1324
Android Java Windows
 
Jesper de Jong
Java Cowboy
Saloon Keeper
Posts: 15441
41
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic