Error 404 running Tomcat from Eclipse - eclipse

I'm new to Eclipse and to Java Web app but i have to work to a project for school on databases.
I created an Eclipse project form the template they gave us and installed Tomcat v7.0
When I start Tomcat "manually" with startup.sh it start nicely and shows the tomcat homepage to localhost:8080. But when I try to run the project from eclipse on both localhost:8080 and localhost:8080/IntroDBProjectit shows the 404 error report.
I already tried copying the ROOTfolder in ../.metadata/.plugins/org.eclipse.wst.server.core/tmp0/webapps/ (and restarting eclipse) but still it doesn't seem to work.
Can someone help?
I'm working on Mac OSX 10.9.2 / Eclipse Java EE IDE / Tomcat v7.0

Ok I solved the problem.
I simply deleted and reimported the project. I should have done that earlier. I feel dumb -.-

Related

Unable to deploy a JSF project with Eclipse Mars

I've been using Eclipse Kepler with Java 1.7, Glassfish 4 and JSF 2.2 successfully for a while. I've just installed Eclipse Mars, the latest version, and installed Java 1.8_66, and got a simple "Hello World" test to run in the console mode. After downloading Glassfish 4.1.1, the latest version, I set up a simple "Hello World JSF" project, but I'm unable to associate it with the server. On right clicking on the Glassfish server in the server window and selecting "Add and Remove", I keep getting the message:
"There are no resources that can be added or removed from the server."
On right clicking on the project then selecting Properties > Project Facets, everything appears to be in order, and have the following selected:
Dynamic Web Module 3.1,
Glassfish Web Extensions 4.0,
Java 1.8,
JavaScript 1.0, and
JavaServer Faces 2.2,
which is identical to the setup I had with Eclipse Kepler, except for the version of Java, and as far as I know, there is no Glassfish Web Extensions 4.1. What is going wrong, and how to I associate the project with the server?
Glassfish is running normally, and get the greeting page at localhost:8080 when I start it manually using asadmin start-domain in the console. However, if I start it from Eclipse, I get the following text in the Eclipse console:
Starting preview server on port 8080
2015-12-25 19:01:41.539:INFO::main: Logging initialized #1285ms
2015-12-25 19:01:41.793:INFO:oejs.Server:main: jetty-9.2.13.v20150730
2015-12-25 19:01:42.173:INFO:oejs.ServerConnector:main: Started ServerConnector#3bcacab5{HTTP/1.1}{0.0.0.0:8080}
2015-12-25 19:01:42.177:INFO:oejs.Server:main: Started #1931ms
with the last four lines in red. When I go to localhost:8080 I get the message:
Error 404 - Not Found
No context on this server matched or handled this request.
Contexts known to this server are:
so the server is obviously running, but doesn't pick up the HTML in the default page. This is presumably related in some way to why I cannot get anything linked with Glassfish in Eclipse.
Some ideas on what is happening and how to fix this would be very welcomed indeed, as I really want to upgrade to the latest versions of Eclipse, Java and Glassfish.

Tomcat server not being recognized

I'm currently using Eclipse Mars on OS X to build a PHP based application which requires a web server for a form submission. However, upon attempting to add Tomcat 7.0 as a server, the server list is empty (shown below).
I've been following several tutorials for setting up and configuring a Tomcat server and each one says to place the extracted Tomcat folder in the Eclipse workspace directory so they'll be detected when adding them in Eclipse. The Apache Tomcat folder is in the workspace directory but it still isn't being detected. I've tried reinstalling Eclipse and deleting any duplicate files but I keep getting the same result. How can I properly set up and configure an Apache Tomcat server in Eclipse Mars?
You can tell it about the Tomcat installation using the Server Runtime Environments preference page.
If Tomcat isn't already a known server type, you might need to install a few more. The WTP FAQ has instructions.
All of those tutorials are wrong. You do want to download a copy of Tomcat from Apache so it has the expected layout when Eclipse looks for the jars needed to launch it, but there's no reason to actually put it in the workspace.
I am also using Eclipse neon and I faced the same problem and the answer was available in a question Apache Tomcat Not Showing in Eclipse Server Runtime Environments in the same site already posted
Of the Available Answers the below steps Worked for me:
1.Help-->Eclipse Marketplace
2.Type Tomcat in search box and choose the Option JST Server Adapters(Apache Tomcat,...) and click on Install
3.Then complete the Simple installation steps and after installation Eclipse prompts for a restart accept and then you can see the Target Run time updated with Tomcat server
Note:I am using Windows

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.

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.

Tomcat 6.0.23 and Eclipse Indigo - server not working through eclipse while working from standalone

When I'm trying to load the server from eclipse it not really deploying it, it start quite fast (without exception).
while i start the same app through tomcat the server is up and it working fine.
any idea what I'm doing wrong?
Thanks,
Gal
From what I understand ,the Apache Tomcat plugin supports up to version 3.6 (Helios) of Eclipse and not 3.7 (Indigo). Maybe I am wrong.