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

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

Related

Unable to add new server in NetBeans 6.5.1 IDE

I am currently having JAVA servlet in my curriculum and for lab sessions we need to integrate Apache Tomcat with the NetBeans IDE. We need to stay version specific, specified in our curriculum. So, we are using Apache Tomcat version 6.0.33, JDK version 1.6 and NetBeans version 6.5.1. I want to add a new Tomcat 6.0 server in my NetBeans IDE. For that I am performing following steps.
Tools -> Servers -> Add Server.
When I click on Add Servers button, the system is supposed to show me a new panel that allows me to select a server and create it. But, in my case nothing is happening. Please help me with this issue.
I have two versions of JDK installed in my system. JDK 1.6 and JDK 1.12. Can this be the reason behind this error.
Updated:
Here's the image of log after I tried to add server.
NetBeans Log
Nothing wrong appears in the log.

How to fix -Djava.endorsed.dirs not supported, that emerged after installing WTP in Eclipse?

I used tomcat for projects before, but this problem came after installing the WTP, and occurs when I try to run the application on server.
First comes a message, could not create Java Virtual Machine, then in the console occures this one:
-Djava.endorsed.dirs=C:\Program Files\Apache Software Foundation\Tomcat 9.0\endorsed is not supported. Endorsed standards and standalone APIs
in modular form will be supported via the concept of upgradeable modules.
To fix this bug, you need to install/update the Eclipse Web Tools Platform (WTP) to version 3.9.4 or later.
Select "Help > Install new Software..."
Select or add following URL:
http://download.eclipse.org/webtools/repository/oxygen
Check Web Tools Platform (WTP) 3.9.4
Select "Next" and follow instructions
(Bug was reported to Eclipse here:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=533162)
I've got the same error in Eclipse running Tomcat 9 on JDK 13. I just removed the -Djava.endorsed.dirs=C:\.... from the VM arguments then restart Tomcat again.
Click on the Open Launch Configuration link from the Overview window
Then remove the -Djava.endorsed line
Eclipse Oxygen.1a and newer releases contain changes to launch Tomcat properly with Java 9. You need to update your IDE.

Open web service explorer with http error 500 in eclipse

I am using eclipse version Eclipse Java EE IDE for Web Developers Luna Release.
When I click Launch the Web Service Explorer under the Run menu, the explorer that eclipse has in its own turns out to be HTTP ERROR: 500. Don't it be a web page instead of reminding me of the error?
I do not know how to solve it.
I find out this problem when I try to publish my first web project with Tomcat installed in the eclipse. However it shows the http error 500.:(
Hope someone can help me~
Thank you in advance!
An alternative is to start eclipse from the command line and use the -vm option, e.g.
./eclipse -vm /Library/Java/JavaVirtualMachines/jdk1.7.0_67.jdk/Contents/Home
You will see a warning from eclipse to select a different vm if one or more installed features depends on jdk8, e.g. Oracle Enterprise Pack for Eclipse. You can click the cancel button at this point.
You can also edit eclipse.ini.
When I uninstalled the Java 8 SDK and used the Java 7 SDK the Web Services Explorer ran normally.

Glassfish eclipse Plugin with jdk 8

Im trying to launch glassfish-4 using glassfish-eclipse-plugin. Unfortunately it does not seem to recognize the JDK-8 Release candidate i just installed (The "Finish" button stays disabled).
Finish button will be enabled if i select a java 7 jdk
Is there any options to work around this?
Now Lambda support works "out-of-the-box" if using below combination of software
Oracle JDK 8
http://www.oracle.com/technetwork/java/javase/downloads/index.html
Glassfish from 4.01 branch
http://dlc.sun.com.edgesuite.net/glassfish/4.0.1/nightly/latest-glassfish.zip
Eclipse 4.4 Luna
http://www.eclipse.org/downloads/ (pick the java ee package)
I had the same problem getting Eclipse Luna and Glassfish to play nicely. I scrapped everything, re-download and installed eclipse-jee-luna-R-win32-x86_64. And then upon creating a new dyanmic web app in Eclipse I had install a new extension for the server runtime environment. That extension was the GlassFish Tools extension from Oracle v7.2.1.2014071142. An Internet connection was required in order for Eclipse to find this. And Voila! So far, so good. Your mileage might vary.

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

Categories

Resources