Community
Participate
Working Groups
I have Eclipse Neon 4.6.3 installed. I also installed Tomcat 9. I have also installed JDK 1.8 and added JAVA_HOME environment variable to the system. Tomcat starts from command prompt successfully outside Eclipse and I can access home page at http://localhost:8080/ so everything is good. When I shut down the server, and create a server inside Eclipse, using the JRE which is under my JDK 1.8, and using Tomcat 9. The server gets created successfully and a Server project also gets created. Please note that I didn't create any other web modules inside Eclipse, so the server is empty but I don't think that should be any problem. The server starts successfully and I can see no errors in console, however, when I try to access home page at http://localhost:8080/ I get this error. I googled the error and tried all the tricks to no avail. Even adding a web module to the server didn't help. Please advise on what I am missing to configure this inside Eclipse. Thanks. HTTP Status 404 – Not Found Type Status Report Message / Description The origin server did not find a current representation for the target resource or is not willing to disclose that one exists. Apache Tomcat/9.0.0.M19
Mahdad, can you please check the server configuration in Eclipse, and verify the Tomcat port id set to 8080?
Hi Patrik, This is from server.xml under C:\Users\Mahdad\workspace\Servers\Tomcat v9.0 Server at localhost-config Tomcat admin port 8005 HTTP/1.1 8080 AJP/1.3 8009 So, accessing http://localhost:8080 gives me 404 and http://localhost:8005 gives me: Jun 07, 2017 11:03:29 AM org.apache.catalina.core.StandardServer await WARNING: StandardServer.await: Invalid command '' received Jun 07, 2017 11:23:20 AM org.apache.catalina.core.StandardServer await WARNING: StandardServer.await: Invalid command 'GET / HTTP/1.1' received If you want, I can paste the whole server.xml or any other config files. Thanks.
Mahdad, thanks for the prompt response. I am raising the severity to major, so this bug is more visible to the wst.server committers. Could I ask you to attach the console output when tomcat is starting? Also, are you sure you stopped the first Tomcat, and all the other services running on port 8080, before launching the second Tomcat from inside Eclipse? (sorry for the very basilar questions)
The default behaviour when starting the server from the tools is using the workspace metadata for the server path which doesn't contains the root app. That's why the root URL of the server does not contains the home page. You can change the behaviour by opening up the server editor and change the Server Location field to "Use Tomcat installation". That'll change the server path to the root of the tomcat installation location and the home page should show.
I forgot to mention that you need to restart the server for changes to take place after you change that settings in the server editor.
Hi Patrik and Elson, The issue was resolved after I changed server location to point to Tomcat installation. The default was "workspace". Now I can see the admin page. Thanks for your help. Mahdad
I am marking this issue as resolved based on comment #6.
No , i am still getting same error
Still I am getting the same issues, I also tried the solution suggested in comment #6. still issues is there. FYI- I am also using Tomcat 9. Please re-open the issue
Created attachment 273362 [details] Solution start tomcat in eclipse
For me worked. As we can see in comment_#10, in "Server location" set "Tomcat installation" and in "Timeouts" > "Start (in seconds)" set a value major > 45sec. My configuration: Tomcat 9.0.6 + Eclipse Oxygen 4.3.7
Well i don't whether this a bug or not but i have a workaround perfectly working. Double click on the Server name under the Servers tab, in that under Server Location choose the second option ie use tomcat location and then restart the server. It should work by now.