c:\Program Files. You’ll save yourselves an enormous headache trying to figure out why Windows is not interpreting the command lines properly if you just remove the cause of the problem. Bloody Bill!
- Download Eclipse IDE for Java EE Developers 3.4 Ganymede from the downloads section of the Eclipse web site.
- Extract the
- Create a desktop shortcut to the Eclipse executable, for easy launching.
- Download Tomcat 6.x from the downloads section of the Tomcat web site. You will need to get the base (Core) pack and not the windows installer pack. The windows installer pack does not include some of the command-line scripts for launching Tomcat.
- Extract the
c:\java\apache-tomcat-6.0.18then rename it to
- Launch Eclipse.
- On a new install of Eclipse it asks you where you want to put your workspace. We are going to place it in
c:\java\workspacebecause the spaces issue will be a problem if it goes into
c:\Documents and Settings\David Newcomb\workspace.
- Next we are going to install our Spring IDE plugin, full instructions on how to do this are on my blog page entitled Eclipse 3.4 Ganymede and Spring IDE 2.0.6.
- After installation it says It is strongly recommended you restart your system for the changes to take effect. .. Restart now?, when it says system it means the eclipse workbench and not your whole computer, so click Yes.
- From the menu bar select Window->Preferences.
- The Preferences window will open. Expand Server.
- Highlight Runtime Environment. This is the place where you can tell Eclipse about where you put your Tomcat installation.
- Click Add.
- Expand Apache and select Apache Tomcat v6.0.
- Check the Create a new local server check box to create a new server in the Servers view.
- Click Next.
- Leave the Name of the server set to Apache Tomcat v6.0.
- Eclipse gives the option to download a version of Tomcat but it usually does not have the latest version (which is why we downloaded it separately). Click Browse and navigate to
c:\java\tomcat and click Ok.
- Leave the JRE drop down set to Workbench default JRE.
- Click Finish.
- You are taken back to the Server Runtime Environments preference page so click Ok.
- A new project will have been created and if you go into the Servers view (in the bottom set of tabs), you will see a new server Apache Tomcat v6.0 at localhost.
- Select File->New->Dynamic Web Project
- Enter a Project name. Although you can have spaces, in my opinion, it’s best not to put any in. The project name becomes the directory name and for the same reason as above it’s a pain if there are spaces.
- The Target Runtime should already be set to Apache Tomcat v6.0.
- Also keep the Configuration set to Default Configuration for Apache Tomcat v6.0.
- Click Finish.
- In the Project Explorer, right click on the new project and select Spring Tools->Add Spring Project Nature.
- Make sure the Servers view is visible (in the bottom set of tabs). Highlight your new Spring Web project and drag it on to the Tomcat v6.0 Server at localhost entry in the Servers tab.
- We want to use the Tomcat server when we use our new project, so we can set the Server project to be a dependency of our new project. This will mean that when we open our project the Server project will open automatically.
- Right click on our project and select Properties.
- Select the Project References option and check the Servers project.
- Click Ok.
Comment from: Anil Singh Bist [Visitor]
Comment from: Raju R [Visitor]
Comment from: Tirumala [Visitor]
Comment from: John [Visitor]
Yes, you are correct. The JEE version of Eclipse comes with support for several versions of application servlet container and application server e.g. JBoss, WebSphere, JOnAS, Oracle OC4J and Apache Tomcat. I found there was no need to load any “extra” plugins.
You still need installed copies of those applications but if you follow my instructions, just substitute Tomcat with your application.
Comment from: Atul [Visitor]
It’s really simple short and nice article helped a lot in setting up the env.
Would appreciate if any one can give me some sample projects ref of spring webservice. thanks in advance!!
Comment from: juni [Visitor]
i have to work struts2.0 with tomcat6.0 in Eclipse Ganymede..
i configured tomcat6.0 like u said here… but i couldnt get the output when i tried http://localhost:8080/ in the browser… it should show tomcat home page na..
since its not worked i havent try struts2.0 .. can u please tell me the solution for this
Sorry Juni, but this article is Tomcat and Spring not Tomcat and Strut. The answer to your problem could literally be anything!
Try asking in the Spring Forum.
I’m afraid that I don’t know how to get Tomcat webapps to run from the Eclipse workspace directly. The publish process copies the required files and libraries into
.metadata/.plugins/org.eclipse.wst.server.core/tmp0 before tomcat is launched from inside Eclipse.
Eclipse runs tomcat by explicitly setting
java.endorsed.dirs to point to your
In order to do the publish you must associate the dynamic web project with the Tomcat server in the Server view.
Comment from: David Erichsen [Visitor]
Hey! Thanks for the great article!
Do you visit any informative spring or JSF websites you could share as well?
Comment from: Ashish [Visitor]
Comment from: lr [Visitor]
Thanks, explanation is clear and detailed.
Comment from: KLR [Visitor]
Comment from: srikanth [Visitor]
Comment from: x [Visitor]
Very nice howto. Even better then the incomplete and frustrating installation instructions I read in ebooks like Spring 2 from novice to professional or Spring in action.
Comment from: Diego [Visitor]
Comment from: Samhitha [Visitor]
Comment from: Dilip [Visitor]
Comment from: Addy [Visitor]
Thanks for the clear article. Instead of tomcat can we configure Websphere Application server. If yes, can someone provide me with the details or URL to find help or any tips, i mean anything will help…
thanks in Advance :)
Comment from: Vicky Gupta [Visitor]
Comment from: Prashant [Visitor]
Comment from: Evgenia [Visitor]
Comment from: Swati [Visitor]
Comment from: bird [Visitor]
Comment from: Vivek [Visitor]
I have OS as windows vista,
I have configured with the steps as given above.
Now i receive an error “Several ports (8005, 8080, 8009) required by Tomcat v6.0 Server at localhost are already in use. The server may already be running in another process, or a system process may be using the port. To start this server you will need to stop the other process or change the port number(s).” when i am trying to start the server.
Comment from: Rajan [Visitor]
Check in the processes tab under the windows task manager, there will be two java processes. You need to kill the java process which is consuming lesser memory. This will resolve the problem of the several ports already in use
Comment from: Jinju [Visitor]
When try to install by this way(From Help->Software Updates give link to eclipse to download springide which is “http://springide.org/updatesite“), it shows below message.i can’t move to next step ,what i can do?
Cannot complete the install because one or more required items could not be found. Software being installed: SpringSource Tool Suite (required) 220.127.116.11101081000-RELEASE (com.springsource.sts.feature.group 18.104.22.168101081000-RELEASE) Missing requirement: com.springsource.sts.ide.ui 22.214.171.124101081000-RELEASE requires ‘bundle org.eclipse.ajdt.ui 0.0.0′ but it could not be found Cannot satisfy dependency:
From: SpringSource Tool Suite (required) 126.96.36.199101081000-RELEASE (com.springsource.sts.feature.group 188.8.131.52101081000-RELEASE) To: com.springsource.sts.ide.ui [184.108.40.206101081000-RELEASE]
Comment from: Habib [Visitor]
Comment from: Priyanka Sabnani [Visitor]
Comment from: sandeep [Visitor]
Comment from: freebird [Visitor]
Form is loading...