Unable to see server location while installing apache in eclipse - eclipse

I am trying to install Apache tomcat in eclipse. When I am doing New-> Server, I am getting the following window
After clicking on next, It is not asking for Tomcat installation directory and I am not able to run it. Please help

Probably you were installed Tomcat and have deleted manually. You have two options:
delete or change your workspace address in Eclipse and then try to install Tomcat again. It will work.
delete the Tomcat configuration files from workspace folder as following:
Close your Eclipse
got to {workspace-directory}/.metadata/.plugins/org.eclipse.core.runtime/.settings
delete these files
org.eclipse.wst.server.core.prefs
org.eclipse.jst.server.tomcat.core.prefs
start Eclipse again
install Tomcat again
enter image description here

Related

How to install and configure Tomcat for eclipse IDE in macOS?

Yes I know there are various similar questions like.
eclipse how to configure tomcat that install from package manager?
but not finding any solution to the problem I am facing.
What I am trying to do:
Install Eclipse on macOS
Install Tomcat 8/8.5 on same machine
Configure Tomcat to test Servlet developed in eclipse
What I have done so far:
1. Installed Eclipse
2. Installed tomcat using brew install tomcat#8 :nothing else done
3. Tried adding Server in Eclipse with path : /usr/local/Cellar/tomcat#8
Step 01 :Download Files Required
First Download the Version you Need for your project.
Make sure you download Core zip file from the link below:
Download Apache 7 Tomcat from this link.
Download Apache 8 Tomcat from this link.
Download Apache 9 Tomcat from this link.
Download Apache 10 (Alpha) Tomcat from this link.
Select .Zip from above section
Once you have downloaded it, unzip it to a location
Step 02 :Setting up Server in Eclipse
Open Eclipse Environment
Click on Servers Tab
Click on No servers are available. Click this link to create a new server...
Click Tomcat v(your downloaded version) Server and Next
Choose the extracted folder as path and runtime.
DONE!

Eclipse "Unknown version of Tomcat was specified" (Ubuntu)

I'm trying to add my Tomcat server to Eclipse but I get the message "Unknown version of Tomcat was specified." I've attached a screenshot to show what values I'm entering:
Notice that Finish button is disabled so I can't continue.The installation directory I've entered here is the same directory as CATALINA_HOME (in tomcat.service). To add the server to Ubuntu prior, I followed this tutorial:
https://www.digitalocean.com/community/tutorials/how-to-install-apache-tomcat-8-on-ubuntu-16-04
I can also confirm that when I start Tomcat, and open http://localhost:8080 in my browser that Tomcat is running and it's version is Apache Tomcat/8.5.35. So Tomcat is working OK it seems.
Anything I'm doing wrong in Eclipse?
I had the same problem until I enabled +rwx permissions for the entire Tomcat installation directory.
From the directory one level up from where Tomcat is installed, enter in the terminal:
sudo chmod -R 755 apache-tomcat-version
Restart Eclipse and your Server setup Finish button should now be activated.
I downloaded the tar file, unzipped it to my ~/Downloads directory. When I use this path, it doesn't give an error. I guess permissions as the /opt/tomcat directory is owned by tomcat user(?) Anyway, that seems to have got me pass that issue, I've yet to write an app and run it in Eclipse to test it all out.
If anyone runs into this on Windows 10 as I did, you should click on the Browse button in the Tomcat installer and go into the Tomcat folder. windows will ask for permission and then everything will be okay after that.

root path glassfish v4 eclipse luna

I had just installed eclipse luna and I use the marketplace to install oracle package to use glassfish v4.0. Everything went ok but when I'm trying to install it they still show me an error at the server root path (Error: The specified directory is not a valid GlassFish installation.)...I don't know why? this happen even giving it a path. have anyone resolve this issue?.
I got caught by this trying to following along with the Lynda.com tutorial on web services with Java EE. You need to download and install Glassfish and then point the server root to the glassfish directory. Here are the steps I took:
download glassfish from here: https://glassfish.java.net/download.html
unzip the zip file: this is essentially the install step
navigate into the installation to the glassfish folder: this what you point eclipse to
The high level answer is here: How do I use Glass fish server with eclipse luna for Java EE?
Possible duplicate of How do I use Glass fish server with eclipse luna for Java EE?
However, you need to specify the "glassfish" folder under the extracted GlassFish files, for example ...\glassfish4\glassfish
First Download full platform from https://glassfish.java.net/download.html
Unzip it.
At the window you read this error, go to the browse for server root and find the glassfish folder inside your unzipped folder. Click on it and your error will be gone.

eclipse tomcat 7.0

I'm trying to set up an Apache Tomcat 7.0 server in Eclipse, but I can't get the wizard to let me create it. My NEXT button won't highlight after I select Tomcat v7.0 like so:
I don't have the same problem trying to create any other version of Tomcat, just v7.0:
Info about my system:
-I've had it up and running previously, but had to go through a reboot with my system, Eclipse was untouched as it was on a different HDD
-I've reinstalled Tomcat 7.0 twice, once to the drive containing this particular Eclipse Workspace, and once to my main OS drive, both to no avail.
Can anyone tell me what I did wrong here or what's going on here?
Thank you very much.
In your eclipse menu go to
window > server > runtime environments > hit add > select tomcat 7 > hit next
press browse and navigate to the installation directory
and finish. Will solve this issue.
Close Eclipse
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
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

Debugging a tomcat project in Eclipse 3.4.2

I downloaded eclipse 3.4.2 and tried installing tomcat plugin (version 3.2.1)for eclipse from sysdeo (http://www.eclipsetotale.com/tomcatPlugin.html)
I have followed installation instructions but when is start tomcat from eclipse toolbar i got the following error
java.lang.NoClassDefFoundError: org/apache/tomcat/util/log/SystemLogHandler
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2357)
at java.lang.Class.getConstructor0(Class.java:2671)
at java.lang.Class.newInstance0(Class.java:321)
at java.lang.Class.newInstance(Class.java:303)
at org.apache.catalina.startup.Bootstrap.init(Bootstrap.java:205)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:390)
I did follow troubleshoot instructions but no success.
I tried to putting plugin in dropin directory too but still got the same error.
This was working fine in eclipse 3.2 and 3.3
Then I tried using standard inbuilt WTP to set up my tomcat server. I am not sure how it will pick my server.xml in conf directory of tomcat, it seems it is not picking as of now.
How do I associate my eclipse project with this setup. I am able to start the server but when i browse the tomcat start page, it does not show anything.
I would appreciate if someone can provide some ways to fix this.
Thanks in advance.
-Dipesh
After trying out few things I was able to debug tomcat project in eclipse 3.4.2
To debug tomcat application/project using eclipse 3.4.2 use WTP plugins which are installed along with it.
Go to Window --> Show View --> Others --> Server
In this view create a new server, please select tomcat installation directory and version information.
Then double click on Tomcat VX.X Server at local host, it opens up configuration settings page
In the Server Locations Section select "Use Tomcat Installation (takes control of Tomcat Installation) and enter deploy path.
In the publishing section select Never Publish automatically and uncheck update context path checkbox.
Voila!! All set to debug tomcat project in eclipse 3.4.2
There is no need to download and copy any extra plugin.
Thanks Juri. Hope this helps.
I'm using Tomcat with Eclipse Java EE version with WTP and it works perfectly. I have Ant scripts which deploy my web app to the tomcat webapp folder. In order to debug, you have to open the Server view in Eclipse, add a new server and choose the correct Tomcat version. Once that's done, open the configuration of Tomcat within eclipse by double-clicking on the server entry in the Eclipse server view you just created. On the left-middle side of the confguration page you should see something like "let Eclipse control the native Tomcat installation", I don't remember the exact text now. You have to choose that. Then you can set a breakpoint in your source code and then start Tomcat in debug mode from within Eclipse's server view.
Hope that helped.
If you are using the Sysdeo plugin, then you don't want to also be using the standard Eclipse WTP servers. To use the Sysdeo plugin, you need to have already downloaded and extracted a standard zipped tomcat directory. Make sure to define CATALINA_HOME in your path. Then, assuming you've correctly installed the sysdeo plugin, go into Eclipse->Windows->Prefs->Tomcat (this is Sysdeo's Tomcat settings, and not the WTP settings). You need to tell the plugin where you've extracted your Tomcat directory, and set it to use Context files.
Now create a new Dynamic web project. Right click it, and go into its properties->Tomcat.
Check it as a 'Tomcat Project'. Give it a context name, and also tell it the directory which would be the base of your war (by default, Eclipse has named this WebContent, I believe). Apply it and close the Window. Right click again your project, and go to the Tomcat section. Add the 'Tomcat Libraries to Build Path' so you can use the Servlet/JSP classes. Finally, click on 'Update Context'. If you go into your Tomcat directory under Conf, you'll see that the plugin has created a context for you that points to your Eclipse workspace. No need for deploying the app to the Tomcat directory. Now, you should be able to click on the Sysdeo Tomcat 'start' button, and your app should be able to connect to your app at localhost:8080/context_name.
HTH,
Bill
Using the excellent Findjar web page for:
org/apache/tomcat/util/log/SystemLogHandler
gives the following:
Information on class org.apache.tomcat.util.log.SystemLogHandler:
Containing JAR files:
jbossweb.jar
gwt-dev-windows.jar
tomcat-util-3.3.2.jar
tomcat-util-4.0.6.jar
tomcat-util-4.1.31.jar
tomcat-util-4.1.34.jar
tomcat-util-4.1.36.jar
tomcat-util-5.0.16.jar
tomcat-util-5.0.18.jar
tomcat-util-5.0.28.jar
tomcat-util-5.5.12.jar
tomcat-util-5.5.15.jar
tomcat-util-5.5.23.jar
tomcat-util-5.5.4.jar
tomcat-util-5.5.7.jar
tomcat-util-5.5.9.jar
tomcat-util-5.5.7-alpha.jar
tomcat-util-5.5.8-alpha.jar
tomcat-util-5.5.9-alpha.jar
Ensure the appropriate jar file is in your CLASSPATH.