• Post Reply Bookmark Topic Watch Topic
  • New Topic

JAVA EE tomcat Eclipse 404 problems

 
Alex Ruhl
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi i'm new to programming , i'm trying to learn servlets and JSP

I have some problems with  tomcat installation  in eclipse and can't figure out what's wrong.

Operation system windows 7 , eclipse EE version the latest neon , tomcat 9

I manage to run tomcat in the browser and in eclipse in the http://localhost:8080/ (all the examples etc are working also )




but if i build a simple project , one html page "hello world test"  the 404 error appears





I did it from this tutorial

https://www.youtube.com/watch?v=oX2rw5pAdxw&index=2&list=PLE0F6C1917A427E96


Simple html page 

index.html




web.xml  



No errors in Console

Sep 30, 2016 9:36:32 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Server version:        Apache Tomcat/9.0.0.M10
Sep 30, 2016 9:36:32 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Server built:          Aug 31 2016 15:00:21 UTC
Sep 30, 2016 9:36:32 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Server number:         9.0.0.0
Sep 30, 2016 9:36:32 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: OS Name:               Windows 7
Sep 30, 2016 9:36:32 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: OS Version:            6.1
Sep 30, 2016 9:36:32 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Architecture:          x86
Sep 30, 2016 9:36:32 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Java Home:             C:\Program Files\Java\jre1.8.0_101
Sep 30, 2016 9:36:32 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: JVM Version:           1.8.0_101-b13
Sep 30, 2016 9:36:32 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: JVM Vendor:            Oracle Corporation
Sep 30, 2016 9:36:32 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: CATALINA_BASE:         C:\Program Files\Apache Software Foundation\Tomcat 9.0
Sep 30, 2016 9:36:32 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: CATALINA_HOME:         C:\Program Files\Apache Software Foundation\Tomcat 9.0
Sep 30, 2016 9:36:32 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dcatalina.base=C:\Program Files\Apache Software Foundation\Tomcat 9.0
Sep 30, 2016 9:36:32 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dcatalina.home=C:\Program Files\Apache Software Foundation\Tomcat 9.0
Sep 30, 2016 9:36:32 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dwtp.deploy=C:\Program Files\Apache Software Foundation\Tomcat 9.0\wtpwebapps
Sep 30, 2016 9:36:32 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Djava.endorsed.dirs=C:\Program Files\Apache Software Foundation\Tomcat 9.0\endorsed
Sep 30, 2016 9:36:32 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dfile.encoding=Cp1252
Sep 30, 2016 9:36:32 PM org.apache.catalina.core.AprLifecycleListener lifecycleEvent
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jre1.8.0_101\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:/Program Files/Java/jre1.8.0_101/bin/client;C:/Program Files/Java/jre1.8.0_101/bin;C:/Program Files/Java/jre1.8.0_101/lib/i386;C:\ProgramData\Oracle\Java\javapath;C:\Program Files\AMD APP\bin\x86;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files\Skype\Phone\;C:\Users\Alex\Documents\New folder\eclipse;;.
Sep 30, 2016 9:36:32 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-nio-8080"]
Sep 30, 2016 9:36:32 PM org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
INFO: Using a shared selector for servlet write/read
Sep 30, 2016 9:36:32 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-nio-8009"]
Sep 30, 2016 9:36:32 PM org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
INFO: Using a shared selector for servlet write/read
Sep 30, 2016 9:36:32 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 616 ms
Sep 30, 2016 9:36:32 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Sep 30, 2016 9:36:32 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/9.0.0.M10
Sep 30, 2016 9:36:32 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\Program Files\Apache Software Foundation\Tomcat 9.0\webapps\docs
Sep 30, 2016 9:36:33 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory C:\Program Files\Apache Software Foundation\Tomcat 9.0\webapps\docs has finished in 281 ms
Sep 30, 2016 9:36:33 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\Program Files\Apache Software Foundation\Tomcat 9.0\webapps\examples
Sep 30, 2016 9:36:33 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
Sep 30, 2016 9:36:33 PM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
Sep 30, 2016 9:36:33 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory C:\Program Files\Apache Software Foundation\Tomcat 9.0\webapps\examples has finished in 366 ms
Sep 30, 2016 9:36:33 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\Program Files\Apache Software Foundation\Tomcat 9.0\webapps\host-manager
Sep 30, 2016 9:36:33 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory C:\Program Files\Apache Software Foundation\Tomcat 9.0\webapps\host-manager has finished in 24 ms
Sep 30, 2016 9:36:33 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\Program Files\Apache Software Foundation\Tomcat 9.0\webapps\manager
Sep 30, 2016 9:36:33 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory C:\Program Files\Apache Software Foundation\Tomcat 9.0\webapps\manager has finished in 29 ms
Sep 30, 2016 9:36:33 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\Program Files\Apache Software Foundation\Tomcat 9.0\webapps\ROOT
Sep 30, 2016 9:36:33 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory C:\Program Files\Apache Software Foundation\Tomcat 9.0\webapps\ROOT has finished in 16 ms
Sep 30, 2016 9:36:33 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler [http-nio-8080]
Sep 30, 2016 9:36:33 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler [ajp-nio-8009]
Sep 30, 2016 9:36:33 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 759 ms



The weird part is if i do this settings , my project run but the http://localhost:8080/ appear an 404 error



Console

Sep 30, 2016 9:56:16 PM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:TestServlet' did not find a matching property.
Sep 30, 2016 9:56:16 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Server version:        Apache Tomcat/9.0.0.M10
Sep 30, 2016 9:56:16 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Server built:          Aug 31 2016 15:00:21 UTC
Sep 30, 2016 9:56:16 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Server number:         9.0.0.0
Sep 30, 2016 9:56:16 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: OS Name:               Windows 7
Sep 30, 2016 9:56:16 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: OS Version:            6.1
Sep 30, 2016 9:56:16 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Architecture:          x86
Sep 30, 2016 9:56:16 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Java Home:             C:\Program Files\Java\jre1.8.0_101
Sep 30, 2016 9:56:16 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: JVM Version:           1.8.0_101-b13
Sep 30, 2016 9:56:16 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: JVM Vendor:            Oracle Corporation
Sep 30, 2016 9:56:16 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: CATALINA_BASE:         C:\JavaProjects\.metadata\.plugins\org.eclipse.wst.server.core\tmp0
Sep 30, 2016 9:56:16 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: CATALINA_HOME:         C:\Program Files\Apache Software Foundation\Tomcat 9.0
Sep 30, 2016 9:56:16 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dcatalina.base=C:\JavaProjects\.metadata\.plugins\org.eclipse.wst.server.core\tmp0
Sep 30, 2016 9:56:16 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dcatalina.home=C:\Program Files\Apache Software Foundation\Tomcat 9.0
Sep 30, 2016 9:56:16 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dwtp.deploy=C:\JavaProjects\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps
Sep 30, 2016 9:56:16 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Djava.endorsed.dirs=C:\Program Files\Apache Software Foundation\Tomcat 9.0\endorsed
Sep 30, 2016 9:56:16 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dfile.encoding=Cp1252
Sep 30, 2016 9:56:16 PM org.apache.catalina.core.AprLifecycleListener lifecycleEvent
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jre1.8.0_101\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:/Program Files/Java/jre1.8.0_101/bin/client;C:/Program Files/Java/jre1.8.0_101/bin;C:/Program Files/Java/jre1.8.0_101/lib/i386;C:\ProgramData\Oracle\Java\javapath;C:\Program Files\AMD APP\bin\x86;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files\Skype\Phone\;C:\Users\Alex\Documents\New folder\eclipse;;.
Sep 30, 2016 9:56:16 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-nio-8080"]
Sep 30, 2016 9:56:16 PM org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
INFO: Using a shared selector for servlet write/read
Sep 30, 2016 9:56:16 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-nio-8009"]
Sep 30, 2016 9:56:16 PM org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
INFO: Using a shared selector for servlet write/read
Sep 30, 2016 9:56:16 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 660 ms
Sep 30, 2016 9:56:16 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Sep 30, 2016 9:56:16 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/9.0.0.M10
Sep 30, 2016 9:56:16 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler [http-nio-8080]
Sep 30, 2016 9:56:16 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler [ajp-nio-8009]
Sep 30, 2016 9:56:16 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 351 ms




What am i missing? please help a newb :P
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!