make tomcat take project from workspace - eclipse

I am working on ubuntu 14.04, have downloaded tomcat7 and then eclipse luna.
I added Tomcat7 to eclipse and started the server. I have changed the port to 3030. When i hit the lolachost:3030, I get a blank page whereas when i deploy a project on server this is the log i see.
org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /usr/share/tomcat7/webapps/first
This is not my workspace path, and it shows 404 page on browser. i need to configure tomcat7 to point my workspace?

Have you tried to Add project to Tomcat Server in Eclipse ?
View "Servers" -> your tomcat server -> "Add and Remove"

I think simply running from localhost cannot run your project, first From eclipse run on server, get the url run it on any browser.

Related

Liferay homepage is not found after starting the server in Eclipse

I have set up a Liferay Tomcat Server in Eclipse. After the server starts and I go to localhost:8181 (where I configured the server), the page is empty. Also, if I right click the server in Eclipse and select Open Liferay Portal Home, a 404 Page Not Found is displayed.
When I start the server outside Eclipse, with startup.bat, the page loads just fine.
Does anyone have a clue about why this might happen?
This answer assumes you're using Liferay IDE in Eclipse. It might be accurate even if you're not.
Try making your edits in the Eclipse workspace's server.xml file. The workspace should have a Servers folder, with your Tomcat Liferay server underneath it. The path in my workspace is as follows:
eclipse-luna-workspace/Servers/Liferay v6.2 CE Server (Tomcat 7) at localhost-config
Underneath the directory for the server are copies of the Tomcat configuration files, including server.xml. Make your edits to this server.xml file, restart your server in Eclipse, and Eclipse should copy it to the Tomcat instance at startup.
Where you defined Tomcat http port? And in which way Tomcat is configured in Eclipse?
These questions because Eclipse is able (but it's not mandatory) to override Tomcat default configurations.
Just a note: do you try to use Liferay plugin for Eclipse? It can help you to proper configure a Liferay server in Eclipse (and help you for development also).

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.

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.

eclipse - add tomcat

I want to add a tomcat server to eclipse.
I follow these instructions:
firstly, In Sever tabs I right click and there's New > Server
I select tomcat 7 and leave the other options default, which are host name, name, runtime environment. Here, I would expect to be prompted to specify installation path - like c:\tomcat or anything
I click finish
There's error popup - Could not load server configuration at conf.....
Thanks for helping me...
Probably missing JST Server Adapters from WTP available from eg. http://download.eclipse.org/releases/indigo.
Cft. Apache Tomcat Not Showing in Eclipse Server Runtime Environments
Worked for me. Was getting the same Could not load server configuration at conf message with Eclipse 3.7 Indigo (ColdFusion IDE).
Installed Tomcat 6 on Win 7.
Stop any Tomcat instances running.
Define a new server, choosing Tomcat 6.
Click Configure runtime environments...
Remove any environments.
Click Seach...
Point to Tomcat dir: C:\Program Files\Apache Software Foundation\Tomcat 6.0
(Should find it) Then click OK and Finish.
Start Tomcat from Eclipse.
FYI, Glassfish wasn't working for me in Eclipse so I went with Tomcat.