eclipse and tomcat- couldn't load tomcat server configuration at - eclipse

I try run spring MVC application via tomcat. I attached to preferences_> server tomcat. But when i start Run On Server next i press finish button. And i see couldn't load tomcat server configuration at /Servers/Tomcat v6.0 server at localhost-config. The configuration may by corrupt or incomplete. Project have to good because it is sample project generated via Spring Tools from template. How fix it?

Related

Eclipse, Tomcat server

As I understood the situation, there is a conflict between the Tomcat server from outside the Eclipse with the Tomcat server from inside the Eclipse. I attached some picture that will explain the situation and I hope I can get your helpWhen I start the server from outside the Eclipse, but I have access the home page for the Tomcat server
When I want to start the Eclipse server while the Tomcat still working
[I stopped the Tomcat server from the Task manager, thus the Eclipse server start without conflict][3]
[With the Eclipse sserver, I lost the access to the Tomcat home page even it says the server tomcat working][4]
The problem is that the tomcat server must not start from inside the Eclipse, it should start from the cmd screen by using the files startup.dat and shutdown by using the shutdown.dat file using their path in the cmd like this:
D:\Apache-Software-Foundation\Tomcat-8.0\bin\startup.bat
D:\Apache-Software-Foundation\Tomcat-8.0\bin\shutdown.bat
As well as there is another problem, which is the server should change the folder name from (Apache Software Foundation) to (Apache-Software-Foundation). Otherwise, it will cause a problem when creating the Path for the server as well as it's better to install it on the Logical partition not in the System partition to avoid any configuration problem.

Eclipse STS connecting to Tomcat

In Spring Tool Suite IDE, have added Tomcat server and started it. Console output says : INFO: Server startup in 19182 ms
But on trying url http://localhost:8080/, gives HTTP error 404
STS version - 3.6.2.
If server is started outside Eclipse, Tomcat homepage is accessible as usual.
Try http://localhost:9087/ and see if that works. You may need to check your configurations for other port numbers, but 9087 should work.
Got it working!
Wile running tomcat in eclipse, not all files are copied in the new deployment location in the eclipse workspace. But after manually copying index.jsp and related images, the home page came.

Starting tomcat in eclipse vs command line

I am using tomcat 6 and when I start it from the command line the application it's running works fine, but when I start tomcat from eclipse (I added it as a server in eclipse) I get a 404 error when I try to run the application in my browser. Any ideas why this is?
By default, when you reference an existing Tomcat instance in Eclipse, only its engine is been used. All already-deployed webapps in Tomcat's /webapps folder are ignored. You seem to expect that they are also accessible when you start Tomcat from inside Eclipse.
You need to configure the Tomcat server reference in Eclipse to set Server Locations to Use Tomcat installation instead of (default) Use workspace metadata. Double click the Tomcat server entry in Servers view to edit it.
This way, everything which is deployed to Tomcat, outside control of Eclipse, will also be available when you start Tomcat from inside Eclipse.

Eclipse + JBoss Tools won't run webapp to configured JBoss AS

I am using Eclipse 3.7.2 with JBoss Tools 3.3 under Ubuntu 12 and have configured a locally installed copy of JBoss AS 7.1.1 in Eclipse under "Preferences::Server::Runtime" Environments.
However, when trying to run a Java EE application by double-clicking on the project or an .xhtml page I only see "Run As / Run" on Server as an option and I get an HTTP 404 from Apache Tomcat/7.0.26 at localhost:8080. That is, it seems like Eclipse is trying to deploy to a Tomcat server as opposed to the JBoss AS I have configured in "Preferences::Server::Runtime" and I don't get an option like "Run on JBoss" or anything. When I export my application as a war and manually deploy to JBoss AS the app runs fine.
The idea is to add your application to a specific server that you have configured. Additionally; just adding the server runtime isn't enough.
You need to open the Servers view, and from there right click on the background and select New, and then Server. If you choose JBoss Community -> JBoss AS 7.1 here, you can select your previously created Server runtime in the Server runtime environment, or optionally create a new one.
Then comes the mental twist that you need to make. In WTP you don't use the Run As command, but instead right click the server in the Servers view (default name should be JBoss 7.1 Runtime Server, and select Add and Remove. Select one or more applications from your workspace that you would like to run on your server. Click finish when done.
Now right click again on your server, and choose either Start or Debug.

Tomcat and Eclipse server configuration

I installed tomcat on my ubuntu. When i create a new Dynamic Web Project I choose the tomcat 7 server. When I launch my page it works on localhost:8080/app/page but if I go on localhost:8080 it give me a 404 error.
If i start tomcat server with an external script like /etc/init.d/tomcat start, it works but I cannot launch my app because it says that the port 8080 is already occupied (by the other instance of tomcat).
I'm confused on how set everything, I would start tomcat at boot and link that instance for my apps.
Can you explain how I hato to do?
Open the server configuration in the Servers tab on Eclipse. On "Server Locations", mark "Use Tomcat installation".
EDIT: to be more precise, this will make Eclipse "take control" of your Tomcat folder. So it will not just make a replica on eclipse .metadata and deploy only your apps on it; instead it will be like if you ran bin/startup, but using some of the configuration defined on Servers view. So if you go localhost:8080 you will see the Welcome page, because /ROOT is now started by Eclipse.
So, I am not against "Starting/Stopping" the server from eclipse but to keep it simple, I think you can stop the server from eclipse (Click on windows/showview/Servers and then stop the server). Then I think you should not get an error if you start tomcat again from external script. Then you can right click on your dynamic web project in eclipse and export it as a war file inside tomcat-install--dir/webapps. Where your web application is available (on which context) depends on the web.xml file. If you need further info on this plz let me know.