Removing the Apache TomCat runtime from a project in Eclipse? - java

I've got a project I've been building on Eclipse Ganymede targetted at tomcat 6.0, I've imported it into Europa and I need it to run on apache Tomcat 5.5
I can't find the reference to where the runtime is set to 6.0 to remove it. I've tried going to Windows > preferences > Server and I've installed the 5.5 runtime.
I can't however seem to find where the reference is to runtime 6.0 to remove it.
Any help would be appreciated.
Update:
I cant find any reference to Tomcat v6.0 in my build path, there is a reference to the servlet-api.jar of tomcat 5.5 though...

When Eclipse is up and running, choose preferences from the window menu. Choose from the bar on the left: Server, Runtime Environments.
Click the button Add, choose the version you want.
To remove the 6.0 reference, goto the libraries tab.

You can delete a Runtime easily from here, with no mess up:
Windows->Preferences->Server->Runtime Enviroments

I had a similar problem. I had a prject referring to a no more existing Tomcat instance.
I was not able to remove Tomcat from "Server" and "Runtime Environments" from UI (delete button always gray),so I solved the problem deleting all the reference from the filesystem:
In project folder check files:
.classpath
.settings/org.eclipse.wst.common.project.facet.core.xml
In workspace folder check:
.metadata.plugins\org.eclipse.debug.core
.metadata.plugins\org.eclipse.wst.server.core
.metadata.plugins\org.eclipse.core.runtime.settings\org.eclipse.jst.server.tomcat.core.prefs
Maybe a bit brutal but I didn't find a better solution.

First, open the eclipse preferences,
then find the sever runtime environments,
you can now delete as you wish.

Unloading the project and reloading it fixed it... Man I love Eclipse...

This was tested over Eclipse Luna 4.4.2
In {workspace-directory}/.metadata/.plugins/org.eclipse.core.runtime/.settings. delete the following two files:
org.eclipse.wst.server.core.prefs
org.eclipse.jst.server.tomcat.core.prefs
Restart Eclipse

Delete the old server and add a new server. I had the same problem due to the fact that i changed the runtime environment to Java EE (for a webservice) and later had problems running my local apps. All i did was to delete and create a new server instance with apache runtime.

after removing the installed runtime from eclipse, do the following:
1] Close Eclipse
2] In {workspace-directory}/.metadata/.plugins/org.eclipse.core.runtime/.settings. delete the following two files:
org.eclipse.wst.server.core.prefs
org.eclipse.jst.server.tomcat.core.prefs
3] Restart Eclipse
ref: http://crunchify.com/eclipse-how-to-fix-installing-apache-tomcat-server-issue-blank-server-name-field/

Open the Build Path and go to the Libraries tab. Remove the Apache Tomcat 6.0 library and add 5.5. This is the library that your project uses to build it self.
You can add new runtimes for running your project in the Servers view (Right-Click, Add new Server)

You can also just define a new server for that, and specify it there, also you can change server configuration just by double clicking on it you will see window with it's properties.

Yep, I have eclipse Version: Indigo Service Release 2; Build id: 20120216-1857, unfortunately deleting the workspace solve the problem with having old Target Runtime. Don't forget to copy all your project work if there is no source control ;) ....

Related

adding tomcat to templates in intellij

as part of instructions to run an open source code they said to use tomcat
I installed tomcat but it is still does not show.
how can I add it there?
It looks like you are using IntelliJ IDEA Community edition, while Tomcat support is the feature of IntelliJ IDEA Ultimate.
I found a way to do that
1- Click on Maven Setting
2- click on Plugins
3- type tomcat and choose Smart Tomcat
4- it is there

Eclipse - Can not create a web application project

I have installed a new version of Eclipse Kepler and have installed the Google Plugin from "http://dl.google.com/eclipse/plugin/4.3" using "Help/Install new software". However, the "g" button to allow the creation of a web application is not in the menu bar. Also when I go to "File>New" the option "Web Application Project" does not appear (I have checked under "Other". What else do I need to install please?
I have used this reference "http://www.gwtproject.org/usingeclipse.html#installing".
I resolved this by installing Eclipse-JEE. It recognised the Eclipse I had already installed, and spent a lot of time on configuring, and configured its self for me. I was very re-leaved as I expected to spend hours re-doing all the work. So if you have a similar issue do not hesitate to install Eclipse-JEE (do not remove the old Eclipse first).
Regards,
Glyn
You need the GWT SDK as well, but that is usually installed with the plugin. Unless you deselected SDK during the installation. What do you see when you go to Window>Preference>Google>Web Toolkit? Any entries there? If not you can use the Add... button to install SDKs.

I have just installed android SDK updates and now my projects are full of errors

I recently just installed downloaded and installed some updates in the android sdk to get access to some features and now when I have restarted eclipse all the projects have errors!!
Theres a small error at the start of package and the only resolutions it suggests is reconfigure build path, here is a picture of the carnage. Does anyone know how I can resolve this?
If java.util is an offending import, you haven't got your JRE configured properly or either the build or the IDE are in a kind of corrupted state. Since you already used the Clean command I'm going for a more complex issue.
Check your project's configuration and make sure you're not still referencing your old Java implementation. If by installing updates you mean that you downloaded a new version, installed it and then deleted the one you've been using so far, then the IDE might not be finding the JRE system library your project has currently configured.
Try right clicking your project > Build Path > Configure build path, then check if your current JRE system library is unbound. If so, you'll have to configure it again on the Libraries tab by using Add Library > JRE System Library.

What can't I see the run-as server option in eclipse

I'm working on a project in Eclipse Version: 3.5.2
My colleague and I both checked out the same maven project from svn. I'm trying to debug it by running it in Tomcat.
He can see the run-as server option when he right-clicks the project, but I can't.
What did I forget to do?
I can't even see the server option under Window->Show View->Other
Thanks
Deployment of applications on Java EE Application Servers or containers is possible only when you have WTP installed. From the screenshots posted, I can infer that either WTP is unavailable or it hasn't been loaded by Eclipse (for some unfortunate reason).
You ought to perform one of the following:
You can get a copy of the Eclipse IDE for Java EE developers, which contains WTP by default. If you need the Galileo edition, you will need to look into the Galileo archives. Also, you should use a JDK to start Eclipse. WTP might not be available if you use a JRE.
If you do not wish to install Eclipse with WTP from scratch, install the WTP plug-ins. Use the Galileo update site for this.
If you are sure that you have WTP installed, but you are unable to find that Galileo has loaded the plug-ins, then you will need to inspect the contents of the .metadata\.log file in your workspace. This would give you a hint as to why the plug-in was not loaded. Start Eclipse with the -clean flag, to get Eclipse to detect the plug-in if it hasn't done so previously.
Note: If WTP has been installed, you should be able to confirm this by view the list of loaded features, as shown below.
Here's are some instructions I wrote up when I configured my Eclipse to work with Tomcat. Hopefully it'll help you.
Open Servers Window
Open the Servers view.
If servers view is not open, select menu item Window/Show View/Other...
Select Servers under the Server section.
Add New Server
Right Click in the Servers View select New/Server
Expand Apache and select Tomcat v5.5 Server
Click Next.
Select the directory of your Tomcat installation. (ie c:\tomcat)
Click Finish
This will be the solution for all your questions. A must read pdf.
Did you create a Web Project? If you right click on the project and go to Properties > Project Facets is Dynamic Web Module selected. This works for me.
In case of web application 3.0 in my case i have taken war file of project and deleted existing app from eclipse and replaced it with war it worked for me

Apache Tomcat Not Showing in Eclipse Server Runtime Environments [duplicate]

This question already has answers here:
How do I import the javax.servlet / jakarta.servlet API in my Eclipse project?
(16 answers)
Closed 1 year ago.
I have tomcat 5.5 installed, running and verifiable at http://localhost:8080/. The Tomcat menu option appears in the Eclipse menu bar and I can start and stop Tomcat from there. In Eclipse, it does not show as a Server Runtime Environment in Window - Preferences - Server - Runtime Environments, nor does it appear in the list of environments that can be added when I click the "Add" button. All I see is the J2EE Runtime Library.
Edit:
Running on Windows XP.
Eclipse version is 3.5.1
In my case I needed to install "JST Server Adapters". I am running Eclipse 3.6 Helios RCP Edition.
Here are the steps I followed:
Help -> Install New Software
Choose "Helios - http://download.eclipse.org/releases/helios" site or kepler - http://download.ecliplse.org/releases/kepler
Expand "Web, XML, and Java EE Development"
Check JST Server Adapters (version 3.2.2)
After that I could define new Server Runtime Environments.
EDIT: With Eclipse 3.7 Indigo Classic, Eclipse Kepler and Luna, the steps are the same (with appropriate update site) but you need both JST Server Adapters and JST Server Adapters Extentions to get the Server Runtime Environment options.
You need to go to Help>Eclipse Marketplace . Then type server in the search box it will display Eclipse JST Server Adapters (Apache Tomcat,...) .Select that one and install it .Then go back to Window>Preferences>Server>Runtime Environnement, click add choose Apache tomcat version then add the installation directory .
I had the same problem and I solved it with the following steps
Help > Install New Software...
Select "Eclipse Web Tools Platform Repository (http://download.eclipse.org/webtools/updates)" from the "Work with" drop-down.
Select "Web Tools Platform (WTP)" and "Project Provided Components".
Complete all the installation steps and restart Eclipse. You'll see a bunch of servers when you try to add a server runtime environment.
Window > Preferences > Server > Runtime Environments (as you said)
Add
Apache > Apache Tomcat 5.5
That has worked for the past 3 versions of Eclipse at least. If there is not such an option on your eclipse, get a fresh installation (for Java EE developers).
nor does it appear in the list of environments that can be added when I click the "Add" button. All I see is the J2EE Runtime Library.
Go get "Eclipse for Java EE developers". Note the extra "EE". This includes among others the Web Tools Platform with among others a lot of server plugins with among others the one for Apache Tomcat 5.x. It's also logically; JSP/Servlet is part of the Java EE API.
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. http://www.youtube.com/watch?v=EOkN5IPoJVs&playnext_from=TL&videos=rVnITzSU2Z8 - 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.
Scenario 1:
You had Eclipse showing server and now after removing the particular version you want to configure at Eclipse a new local server instance. But you can not move further.
This happens due to reason Eclipse still looks for configured version of Tomcat directory, which directory is no longer there.
There is no need till LUNA to make fresh installation!
All we need is to REPLACE the new server run time environment into eclipse after removing old one, which is non-existent. Eclipse will
Help -> check for updates upon Eclipse update solved the issue

Categories

Resources