Mac-Intellij Community-Smart Tomcat-HTTP Status 404 – Not Found - spring

I trying to setup the spring-mvc project on intellij community edition 2019-3 on mac. I am using smart tomcat for it.
I am trying the example given by journalDev https://www.journaldev.com/14476/spring-mvc-example
It's getting build successfully.
Stacktrace
"/Applications/IntelliJ IDEA CE.app/Contents/jbr/Contents/Home/bin/java" -Dfile.encoding=UTF-8 -classpath /Users/slandge/Documents/Tomcat/apache-tomcat-9.0.29/bin/tomcat-juli.jar:/Users/slandge/Documents/Tomcat/apache-tomcat-9.0.29/bin/commons-daemon.jar:/Users/slandge/Documents/Tomcat/apache-tomcat-9.0.29/bin/bootstrap.jar:/Users/slandge/Documents/Tomcat/apache-tomcat-9.0.29/lib/tomcat-i18n-ko.jar:/Users/slandge/Documents/Tomcat/apache-tomcat-9.0.29/lib/el-api.jar:/Users/slandge/Documents/Tomcat/apache-tomcat-9.0.29/lib/tomcat-i18n-es.jar:/Users/slandge/Documents/Tomcat/apache-tomcat-9.0.29/lib/tomcat-websocket.jar:/Users/slandge/Documents/Tomcat/apache-tomcat-9.0.29/lib/jasper.jar:/Users/slandge/Documents/Tomcat/apache-tomcat-9.0.29/lib/jasper-el.jar:/Users/slandge/Documents/Tomcat/apache-tomcat-9.0.29/lib/tomcat-util.jar:/Users/slandge/Documents/Tomcat/apache-tomcat-9.0.29/lib/tomcat-i18n-de.jar:/Users/slandge/Documents/Tomcat/apache-tomcat-9.0.29/lib/catalina-storeconfig.jar:/Users/slandge/Documents/Tomcat/apache-tomcat-9.0.29/lib/jsp-api.jar:/Users/slandge/Documents/Tomcat/apache-tomcat-9.0.29/lib/catalina-tribes.jar:/Users/slandge/Documents/Tomcat/apache-tomcat-9.0.29/lib/tomcat-i18n-cs.jar:/Users/slandge/Documents/Tomcat/apache-tomcat-9.0.29/lib/catalina.jar:/Users/slandge/Documents/Tomcat/apache-tomcat-9.0.29/lib/tomcat-jni.jar:/Users/slandge/Documents/Tomcat/apache-tomcat-9.0.29/lib/tomcat-i18n-pt-BR.jar:/Users/slandge/Documents/Tomcat/apache-tomcat-9.0.29/lib/ecj-4.13.jar:/Users/slandge/Documents/Tomcat/apache-tomcat-9.0.29/lib/websocket-api.jar:/Users/slandge/Documents/Tomcat/apache-tomcat-9.0.29/lib/tomcat-coyote.jar:/Users/slandge/Documents/Tomcat/apache-tomcat-9.0.29/lib/catalina-ha.jar:/Users/slandge/Documents/Tomcat/apache-tomcat-9.0.29/lib/tomcat-api.jar:/Users/slandge/Documents/Tomcat/apache-tomcat-9.0.29/lib/annotations-api.jar:/Users/slandge/Documents/Tomcat/apache-tomcat-9.0.29/lib/jaspic-api.jar:/Users/slandge/Documents/Tomcat/apache-tomcat-9.0.29/lib/tomcat-i18n-zh-CN.jar:/Users/slandge/Documents/Tomcat/apache-tomcat-9.0.29/lib/catalina-ant.jar:/Users/slandge/Documents/Tomcat/apache-tomcat-9.0.29/lib/servlet-api.jar:/Users/slandge/Documents/Tomcat/apache-tomcat-9.0.29/lib/tomcat-util-scan.jar:/Users/slandge/Documents/Tomcat/apache-tomcat-9.0.29/lib/tomcat-i18n-ja.jar:/Users/slandge/Documents/Tomcat/apache-tomcat-9.0.29/lib/tomcat-i18n-ru.jar:/Users/slandge/Documents/Tomcat/apache-tomcat-9.0.29/lib/tomcat-jdbc.jar:/Users/slandge/Documents/Tomcat/apache-tomcat-9.0.29/lib/tomcat-i18n-fr.jar:/Users/slandge/Documents/Tomcat/apache-tomcat-9.0.29/lib/tomcat-dbcp.jar org.apache.catalina.startup.Bootstrap start
Dec 12, 2019 7:18:17 PM org.apache.catalina.startup.ClassLoaderFactory validateFile
WARNING: Problem with directory [/Users/slandge/.SmartTomcat/spring-mvc-example/spring-mvc-example/lib], exists: [false], isDirectory: [false], canRead: [false]
Dec 12, 2019 7:18:17 PM org.apache.catalina.startup.ClassLoaderFactory validateFile
WARNING: Problem with directory [/Users/slandge/.SmartTomcat/spring-mvc-example/spring-mvc-example/lib], exists: [false], isDirectory: [false], canRead: [false]
Dec 12, 2019 7:18:17 PM org.apache.catalina.startup.ClassLoaderFactory validateFile
WARNING: Problem with directory [/Users/slandge/.SmartTomcat/spring-mvc-example/spring-mvc-example/lib], exists: [false], isDirectory: [false], canRead: [false]
Dec 12, 2019 7:18:17 PM org.apache.catalina.startup.ClassLoaderFactory validateFile
WARNING: Problem with directory [/Users/slandge/.SmartTomcat/spring-mvc-example/spring-mvc-example/lib], exists: [false], isDirectory: [false], canRead: [false]
Dec 12, 2019 7:18:17 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Server version name: Apache Tomcat/9.0.29
Dec 12, 2019 7:18:17 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Server built: Nov 16 2019 17:29:07 UTC
Dec 12, 2019 7:18:17 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Server version number: 9.0.29.0
Dec 12, 2019 7:18:17 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: OS Name: Mac OS X
Dec 12, 2019 7:18:17 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: OS Version: 10.14.5
Dec 12, 2019 7:18:17 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Architecture: x86_64
Dec 12, 2019 7:18:17 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Java Home: /Applications/IntelliJ IDEA CE.app/Contents/jbr/Contents/Home
Dec 12, 2019 7:18:17 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: JVM Version: 11.0.4+10-b520.11
Dec 12, 2019 7:18:17 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: JVM Vendor: JetBrains s.r.o
Dec 12, 2019 7:18:17 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: CATALINA_BASE: /Users/slandge/.SmartTomcat/spring-mvc-example/spring-mvc-example
Dec 12, 2019 7:18:17 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: CATALINA_HOME: /Users/slandge/.SmartTomcat/spring-mvc-example/spring-mvc-example
Dec 12, 2019 7:18:17 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dfile.encoding=UTF-8
Dec 12, 2019 7:18:17 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: [/Users/slandge/Library/Java/Extensions:/Library/Java/Extensions:/Network/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java:.]
Dec 12, 2019 7:18:18 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-nio-8080"]
Dec 12, 2019 7:18:18 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-nio-8009"]
Dec 12, 2019 7:18:18 PM org.apache.catalina.startup.Catalina load
INFO: Server initialization in [503] milliseconds
Dec 12, 2019 7:18:18 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service [Catalina]
Dec 12, 2019 7:18:18 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet engine: [Apache Tomcat/9.0.29]
Dec 12, 2019 7:18:18 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-nio-8080"]
Dec 12, 2019 7:18:18 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-nio-8009"]
Dec 12, 2019 7:18:18 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in [338] milliseconds
http://localhost:8080/spring-mvc-example
When I am trying to access the above url. I am getting below error.
HTTP Status 404 – Not Found
Type Status Report
Message /spring-mvc-example/
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.29
Following are the run configuration

Related

Unable to start thredds under tomcat7

I've seen similar posts, but none that seem to be similar enough to help. I'm running Tomcat 7.0.68 and Java 1.8.0_231 on CentOS 6.10 and so far have been unable to install thredds successfully. I followed the instructions at https://www.unidata.ucar.edu/software/tds/current/tutorial/GettingStarted.html#deploying, dropping the thredds.war file into the /opt/tomcat7/webapps directory, and while the thredds directory structure was unpacked, I could not hit localhost:8080/thredds, nor did the /opt/tomcat7/content directory get created.
Here's the pertinent snippet from catalina.out:
Nov 14, 2019 4:11:43 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Server version: Apache Tomcat/7.0.68
Nov 14, 2019 4:11:43 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Server built: Feb 8 2016 20:25:54 UTC
Nov 14, 2019 4:11:43 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Server number: 7.0.68.0
Nov 14, 2019 4:11:43 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: OS Name: Linux
Nov 14, 2019 4:11:43 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: OS Version: 2.6.32-754.23.1.el6.x86_64
Nov 14, 2019 4:11:43 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Architecture: amd64
Nov 14, 2019 4:11:43 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Java Home: /usr/java/jre1.8.0_231-amd64
Nov 14, 2019 4:11:43 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: JVM Version: 1.8.0_231-b11
Nov 14, 2019 4:11:43 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: JVM Vendor: Oracle Corporation
Nov 14, 2019 4:11:43 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: CATALINA_BASE: /opt/tomcat7
Nov 14, 2019 4:11:43 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: CATALINA_HOME: /opt/tomcat7
Nov 14, 2019 4:11:43 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Djava.util.logging.config.file=/opt/tomcat7/conf/logging.properties
Nov 14, 2019 4:11:43 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
Nov 14, 2019 4:11:43 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Xmx36864m
Nov 14, 2019 4:11:43 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Xms16384m
Nov 14, 2019 4:11:43 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Djava.endorsed.dirs=/opt/tomcat7/endorsed
Nov 14, 2019 4:11:43 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dcatalina.base=/opt/tomcat7
Nov 14, 2019 4:11:43 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dcatalina.home=/opt/tomcat7
Nov 14, 2019 4:11:43 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Djava.io.tmpdir=/opt/tomcat7/temp
Nov 14, 2019 4:11:43 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: /usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
Nov 14, 2019 4:11:43 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
Nov 14, 2019 4:11:43 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
Nov 14, 2019 4:11:43 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 780 ms
Nov 14, 2019 4:11:43 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Nov 14, 2019 4:11:43 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.68
Nov 14, 2019 4:11:43 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive /opt/apache-tomcat-7.0.68/webapps/thredds.war
Nov 14, 2019 4:11:43 PM org.apache.catalina.loader.WebappClassLoaderBase validateJarFile
INFO: validateJarFile(/opt/tomcat7/webapps/thredds/WEB-INF/lib/javax.servlet-api-3.1.0.jar) - jar not loaded. See Servlet Spec 3.0, section 10.7.2. Offending class: javax/servlet/Servlet.class
Nov 14, 2019 4:11:47 PM org.apache.catalina.startup.TldConfig execute
INFO: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
Nov 14, 2019 4:11:49 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: One or more listeners failed to start. Full details will be found in the appropriate container log file
Nov 14, 2019 4:12:16 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Context [/thredds] startup failed due to previous errors
Nov 14, 2019 4:12:16 PM org.apache.catalina.loader.WebappClassLoaderBase clearReferencesThreads
SEVERE: The web application [/thredds] appears to have started a thread named [Log4j2-TF-6-Scheduled-2] but has failed to stop it. This is very likely to create a memory leak.
Nov 14, 2019 4:12:16 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deployment of web application archive /opt/apache-tomcat-7.0.68/webapps/thredds.war has finished in 33,195 ms
Nov 14, 2019 4:12:16 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /opt/apache-tomcat-7.0.68/webapps/ROOT
Nov 14, 2019 4:12:17 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory /opt/apache-tomcat-7.0.68/webapps/ROOT has finished in 31 ms
Nov 14, 2019 4:12:17 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /opt/apache-tomcat-7.0.68/webapps/manager
Nov 14, 2019 4:12:17 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory /opt/apache-tomcat-7.0.68/webapps/manager has finished in 27 ms
Nov 14, 2019 4:12:17 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /opt/apache-tomcat-7.0.68/webapps/host-manager
Nov 14, 2019 4:12:17 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory /opt/apache-tomcat-7.0.68/webapps/host-manager has finished in 22 ms
Nov 14, 2019 4:12:17 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /opt/apache-tomcat-7.0.68/webapps/docs
Nov 14, 2019 4:12:17 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory /opt/apache-tomcat-7.0.68/webapps/docs has finished in 18 ms
Nov 14, 2019 4:12:17 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /opt/apache-tomcat-7.0.68/webapps/examples
Nov 14, 2019 4:12:17 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory /opt/apache-tomcat-7.0.68/webapps/examples has finished in 90 ms
Nov 14, 2019 4:12:17 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8080"]
Nov 14, 2019 4:12:17 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-bio-8009"]
Nov 14, 2019 4:12:17 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 33435 ms
I should note that I haven't been able to find the referenced "container log file", so I've run into somewhat of a roadblock. Thanks in advance for any help.
THREDDS Data Server: Deployment fails in Tomcat 8 gave me the hint to look for a log file named "localhost.2019-11-14.log". In it I noticed this line:
"tds.content.root.path" property isn't defined.
Sure enough, thredds started successfully when I added this line to /opt/tomcat7/webapps/thredds/WEB-INF/classes/thredds/server/tds.properties:
tds.content.root.path=/opt/apache-tomcat-7.0.68/webapps/

New Maven Project in IntelliJ

So I created a new maven project in IntelliJ. To run it I am using Smart Tomcat. Here you can see its settings.
When I run the project I get his log output.
Apr 06, 2019 8:37:04 AM org.apache.catalina.startup.ClassLoaderFactory validateFile
WARNING: Problem with directory [/Users/theodosiostziomakas/.SmartTomcat/emailservice/web-service-verification/lib], exists: [false], isDirectory: [false], canRead: [false]
Apr 06, 2019 8:37:04 AM org.apache.catalina.startup.ClassLoaderFactory validateFile
WARNING: Problem with directory [/Users/theodosiostziomakas/.SmartTomcat/emailservice/web-service-verification/lib], exists: [false], isDirectory: [false], canRead: [false]
Apr 06, 2019 8:37:04 AM org.apache.catalina.startup.ClassLoaderFactory validateFile
WARNING: Problem with directory [/Users/theodosiostziomakas/.SmartTomcat/emailservice/web-service-verification/lib], exists: [false], isDirectory: [false], canRead: [false]
Apr 06, 2019 8:37:04 AM org.apache.catalina.startup.ClassLoaderFactory validateFile
WARNING: Problem with directory [/Users/theodosiostziomakas/.SmartTomcat/emailservice/web-service-verification/lib], exists: [false], isDirectory: [false], canRead: [false]
Apr 06, 2019 8:37:05 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Server version name: Apache Tomcat/9.0.16
Apr 06, 2019 8:37:05 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Server built: Feb 4 2019 16:30:29 UTC
Apr 06, 2019 8:37:05 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Server version number: 9.0.16.0
Apr 06, 2019 8:37:05 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: OS Name: Mac OS X
Apr 06, 2019 8:37:05 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: OS Version: 10.14.4
Apr 06, 2019 8:37:05 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Architecture: x86_64
Apr 06, 2019 8:37:05 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Java Home: /Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/jre
Apr 06, 2019 8:37:05 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: JVM Version: 1.8.0_131-b11
Apr 06, 2019 8:37:05 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: JVM Vendor: Oracle Corporation
Apr 06, 2019 8:37:05 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: CATALINA_BASE: /Users/theodosiostziomakas/.SmartTomcat/emailservice/web-service-verification
Apr 06, 2019 8:37:05 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: CATALINA_HOME: /Users/theodosiostziomakas/.SmartTomcat/emailservice/web-service-verification
Apr 06, 2019 8:37:05 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dfile.encoding=UTF-8
Apr 06, 2019 8:37:05 AM 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: [/Users/theodosiostziomakas/Library/Java/Extensions:/Library/Java/Extensions:/Network/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java:.]
Apr 06, 2019 8:37:06 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-nio-8080"]
Apr 06, 2019 8:37:06 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-nio-8009"]
Apr 06, 2019 8:37:06 AM org.apache.catalina.startup.Catalina load
INFO: Server initialization in [1,415] milliseconds
Apr 06, 2019 8:37:06 AM org.apache.catalina.core.StandardService startInternal
INFO: Starting service [Catalina]
Apr 06, 2019 8:37:06 AM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet engine: [Apache Tomcat/9.0.16]
Apr 06, 2019 8:37:06 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-nio-8080"]
Apr 06, 2019 8:37:06 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-nio-8009"]
Apr 06, 2019 8:37:06 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in [717] milliseconds
http://localhost:8080/web-service-verification
Finally I type http://localhost:8080/web-service-ve,rification in Chrome browser. However, I am getting that annoying 404 error. Should I make any additional settings in the project? I repeat it is a Maven and not a Spring boot project.
You can clone and run the project if you want to see what I am talking about.
https://github.com/theo82/email-service

Can't get WebApp to initialize on Eclipse's Tomcat [was working previously]

I cannot initialize my app on Eclipse's tomcat. It was working fine 8 hours ago. I left it unattended.
Upon my return I had some unrelated issues where a type from the same package could not be resolved so I: 1. Cleaned Maven, 2. Updated project 3. Deleted / RE-added server 4. Rebooted Eclipse
After this the app will not initialize on tomcat. I ran maven build and that built .war if that makes any difference.
Please see server initialization log, servlet initializer, web.xml below.
Some notes:
- I did not edit my pom.xml
App runs on annotations not xml
The sysout's on servlet initializer don't get printed so it doesn't get to that stage.
Servlet Init
package domain.config;
import org.springframework.web.servlet.support.AbstractAnnotationConfigDispatcherServletInitializer;
public class ServletInitializer extends AbstractAnnotationConfigDispatcherServletInitializer {
#Override
protected Class<?>[] getRootConfigClasses() {
System.out.println("Security Servlet init");
return new Class[] { SecurityConfig.class };
}
#Override
protected Class<?>[] getServletConfigClasses() {
System.out.println("Config Servlet init");
return new Class[] { ConfigClass.class };
}
#Override
protected String[] getServletMappings() {
return new String[] { "/" };
}
}
Tomcat log
Nov 29, 2018 4:42:06 PM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.j2ee.server:applicationform' did not find a matching property.
Nov 29, 2018 4:42:06 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Server version: Apache Tomcat/9.0.10
Nov 29, 2018 4:42:06 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Server built: Jun 20 2018 17:32:21 UTC
Nov 29, 2018 4:42:06 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Server number: 9.0.10.0
Nov 29, 2018 4:42:06 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: OS Name: Windows 10
Nov 29, 2018 4:42:06 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: OS Version: 10.0
Nov 29, 2018 4:42:06 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Architecture: amd64
Nov 29, 2018 4:42:06 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Java Home: C:\Program Files\Java\jdk1.8.0_144\jre
Nov 29, 2018 4:42:06 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: JVM Version: 1.8.0_144-b01
Nov 29, 2018 4:42:06 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: JVM Vendor: Oracle Corporation
Nov 29, 2018 4:42:06 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: CATALINA_BASE: C:\Users\OUYanis\Documents\live\.metadata\.plugins\org.eclipse.wst.server.core\tmp4
Nov 29, 2018 4:42:06 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: CATALINA_HOME: C:\Program Files (x86)\Apache Software Foundation\Tomcat 9.0
Nov 29, 2018 4:42:06 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dcatalina.base=C:\Users\OUYanis\Documents\live\.metadata\.plugins\org.eclipse.wst.server.core\tmp4
Nov 29, 2018 4:42:06 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dcatalina.home=C:\Program Files (x86)\Apache Software Foundation\Tomcat 9.0
Nov 29, 2018 4:42:06 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dwtp.deploy=C:\Users\OUYanis\Documents\live\.metadata\.plugins\org.eclipse.wst.server.core\tmp4\wtpwebapps
Nov 29, 2018 4:42:06 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Djava.endorsed.dirs=C:\Program Files (x86)\Apache Software Foundation\Tomcat 9.0\endorsed
Nov 29, 2018 4:42:06 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dfile.encoding=Cp1252
Nov 29, 2018 4:42:06 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\jdk1.8.0_144\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:/Program Files (x86)/Java/jre1.8.0_161/bin/client;C:/Program Files (x86)/Java/jre1.8.0_161/bin;C:/Program Files (x86)/Java/jre1.8.0_161/lib/i386;C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files\Acer\Remote Files\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Skype\Phone\;C:\Program Files\PuTTY\;C:\WINDOWS\System32\OpenSSH\;C:\Users\OUYanis\AppData\Local\Microsoft\WindowsApps;C:\sts-3.9.5.RELEASE;;.]
Nov 29, 2018 4:42:07 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-nio-8080"]
Nov 29, 2018 4:42:07 PM org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
INFO: Using a shared selector for servlet write/read
Nov 29, 2018 4:42:07 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-nio-8009"]
Nov 29, 2018 4:42:07 PM org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
INFO: Using a shared selector for servlet write/read
Nov 29, 2018 4:42:07 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 2540 ms
Nov 29, 2018 4:42:07 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service [Catalina]
Nov 29, 2018 4:42:07 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/9.0.10
Nov 29, 2018 4:42:21 PM org.apache.jasper.servlet.TldScanner scanJars
INFO: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
Nov 29, 2018 4:42:21 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-nio-8080"]
Nov 29, 2018 4:42:21 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-nio-8009"]
Nov 29, 2018 4:42:21 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 13723 ms
Edit, Deployment Assembly
Yanis, I'm glad that did work for you, I actually had the same issue on my side and it did take me a time to figure out that the setting that I had to change was the Deployment Assembly like the screenshot you've posted there.

Upgrading to and setting up CAS 5.1.x with cas-server-webapp-tomcat

I've been trying to change to a CAS 5.1.x Server from a 4.X Server for the past 3 days with various searches and research and next to no progress. Whenever I remove the dependency to cas-server-webapp-tomcat, the artifact deploys on the local tomcat apache server however it does not show anything except the standard Apache 404 error page. Here is the log for that case:
"C:\Program Files\Java\jdk1.8.0_144\bin\java" -Dcatalina.base=C:\Users\dhogue\.IntelliJIdea2017.1\system\tomcat\Unnamed_src-cas_2 "-Dcatalina.home=C:\Tomcat 70" "-Djava.io.tmpdir=C:\Tomcat 70\temp" -Dcom.sun.management.jmxremote= -Dcom.sun.management.jmxremote.port=1099 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Djava.rmi.server.hostname=127.0.0.1 -cp "C:\Tomcat 70\bin\bootstrap.jar;C:\Tomcat 70\bin\tomcat-juli.jar" org.apache.catalina.startup.Bootstrap start
[2017-09-27 01:11:17,832] Artifact src-cas:war: Server is not connected. Deploy is not available.
Sep 27, 2017 1:11:19 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Server version: Apache Tomcat/7.0.63
Sep 27, 2017 1:11:19 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Server built: Jun 30 2015 08:08:33 UTC
Sep 27, 2017 1:11:19 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Server number: 7.0.63.0
Sep 27, 2017 1:11:19 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: OS Name: Windows 7
Sep 27, 2017 1:11:19 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: OS Version: 6.1
Sep 27, 2017 1:11:19 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Architecture: amd64
Sep 27, 2017 1:11:19 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Java Home: C:\Program Files\Java\jdk1.8.0_144\jre
Sep 27, 2017 1:11:19 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: JVM Version: 1.8.0_144-b01
Sep 27, 2017 1:11:19 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: JVM Vendor: Oracle Corporation
Sep 27, 2017 1:11:19 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: CATALINA_BASE: C:\Users\dhogue\.IntelliJIdea2017.1\system\tomcat\Unnamed_src-cas_2
Sep 27, 2017 1:11:19 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: CATALINA_HOME: C:\Tomcat 70
Sep 27, 2017 1:11:19 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dcatalina.base=C:\Users\dhogue\.IntelliJIdea2017.1\system\tomcat\Unnamed_src-cas_2
Sep 27, 2017 1:11:19 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dcatalina.home=C:\Tomcat 70
Sep 27, 2017 1:11:19 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Djava.io.tmpdir=C:\Tomcat 70\temp
Sep 27, 2017 1:11:19 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dcom.sun.management.jmxremote=
Sep 27, 2017 1:11:19 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dcom.sun.management.jmxremote.port=1099
Sep 27, 2017 1:11:19 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dcom.sun.management.jmxremote.ssl=false
Sep 27, 2017 1:11:19 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dcom.sun.management.jmxremote.authenticate=false
Sep 27, 2017 1:11:19 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Djava.rmi.server.hostname=127.0.0.1
Sep 27, 2017 1:11:19 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\jdk1.8.0_144\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Program Files\phantomjs-2.1.1-windows\bin;C:\Program Files\jscoverage-0.5.1;C:\Ruby22-x64\bin;C:\Program Files\apache-ant-1.9.9/bin;C:\Program Files\apache-maven-3.0.4\bin;C:\ProgramData\Oracle\Java\javapath;c:\Program Files (x86)\AMD APP\bin\x86_64;c:\Program Files (x86)\AMD APP\bin\x86;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;c:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files\TortoiseSVN\bin;C:\Program Files\MySQL\MySQL Utilities 1.6\;C:\Program Files (x86)\Skype\Phone\;.
Sep 27, 2017 1:11:19 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-9090"]
Sep 27, 2017 1:11:19 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-bio-9009"]
Sep 27, 2017 1:11:19 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 929 ms
Sep 27, 2017 1:11:19 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Sep 27, 2017 1:11:19 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.63
Sep 27, 2017 1:11:19 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-9090"]
Sep 27, 2017 1:11:19 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-bio-9009"]
Sep 27, 2017 1:11:19 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 54 ms
Connected to server
[2017-09-27 01:11:19,924] Artifact src-cas:war: Artifact is being deployed, please wait...
Sep 27, 2017 1:11:22 PM org.apache.catalina.loader.WebappClassLoader validateJarFile
INFO: validateJarFile(C:\Tomcat 70\webapps\ROOT\WEB-INF\lib\el-api-2.2.jar) - jar not loaded. See Servlet Spec 3.0, section 10.7.2. Offending class: javax/el/Expression.class
Sep 27, 2017 1:11:29 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\Tomcat 70\webapps\manager
Sep 27, 2017 1:11:29 PM org.apache.catalina.startup.TldConfig execute
INFO: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
Sep 27, 2017 1:11:30 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory C:\Tomcat 70\webapps\manager has finished in 195 ms
Sep 27, 2017 1:11:30 PM org.apache.catalina.startup.TldConfig execute
INFO: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
Sep 27, 2017 1:11:30 PM org.apache.catalina.core.ApplicationContext log
INFO: 1 Spring WebApplicationInitializers detected on classpath
[2017-09-27 01:11:30,468] Artifact src-cas:war: Artifact is deployed successfully
[2017-09-27 01:11:30,468] Artifact src-cas:war: Deploy took 10,544 milliseconds
Whenever I try to run it with the cas-server-webapp-tomcat dependency no matter what I've tried, I've always ended up with an error as shown in the following log: Error with cas-server-webapp-tomcat
Here is my current Pom file...excuse the mess: cas.pom
IDE: IntelliJ IDEA
Not sure what else would be needed, ask and I'll provide whatever you need to help me.
Two things stand out to me:
cas-server-webapp-tomcat contains an embedded tomcat container. If you are using an external one, use cas-server-webapp.
It looks like your external tomcat is 7.x. You need at least Tomcat 8.
https://apereo.github.io/cas/5.1.x/installation/Configuring-Servlet-Container.html

404 error org.springframework.web.servlet.PageNotFound noHandlerFound

In my spring configuratin file, I have written this code <mvc:view-controller path="/results" view-name="results" /> to map '/results' to viewName 'results'. Its working fine. But the below mappings in the controller are not working.
#RequestMapping(value = "/form", method = RequestMethod.GET)
#RequestMapping(value = "/form", method = RequestMethod.POST)
Its throwing 404 error, when accessing this URL http://localhost:8090/SpringFormValidation/form.
when I removed this code <mvc:view-controller path="/results" view-name="results" />, then the mappings in the controller works fine.
I am just clueless, what is causing it?
I am posting my console output, Controller class and spring configuration file.
My controller class:
package com.github.binoybaranwal.controller;
import javax.validation.Valid;
import org.springframework.stereotype.Controller;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
import com.github.binoybaranwal.pojo.Person;
#Controller
public class WebController extends WebMvcConfigurerAdapter {
#Override
public void addViewControllers(ViewControllerRegistry registry){
registry.addViewController("/results").setViewName("results");
}
#RequestMapping(value = "/form", method = RequestMethod.GET)
public String showForm(Person person){
return "form";
}
#RequestMapping(value = "/form", method = RequestMethod.POST)
public String checkPersonInfo(#Valid Person person, BindingResult bindingResult){
if(bindingResult.hasErrors()){
return "form";
}
return "redirect:/results";
}
}
My spring configuration file
SpringFormValidation-servlet.xml
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-4.1.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-4.1.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-4.1.xsd
http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/mvc/spring-mvc.xsd">
<context:component-scan base-package="com.github.binoybaranwal.controller" />
<tx:annotation-driven/>
<mvc:view-controller path="/results" view-name="results" />
</beans>
My console output:
Dec 14, 2015 12:18:28 AM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:SpringFormValidation' did not find a matching property.
Dec 14, 2015 12:18:28 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Server version: Apache Tomcat/7.0.59
Dec 14, 2015 12:18:28 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Server built: Jan 28 2015 15:51:10 UTC
Dec 14, 2015 12:18:28 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Server number: 7.0.59.0
Dec 14, 2015 12:18:28 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: OS Name: Windows 8
Dec 14, 2015 12:18:28 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: OS Version: 6.2
Dec 14, 2015 12:18:28 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Architecture: amd64
Dec 14, 2015 12:18:28 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Java Home: C:\Program Files\Java\jre7
Dec 14, 2015 12:18:28 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: JVM Version: 1.7.0_79-b15
Dec 14, 2015 12:18:28 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: JVM Vendor: Oracle Corporation
Dec 14, 2015 12:18:28 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: CATALINA_BASE: C:\apache-tomcat-7.0.59-windows-x86\apache-tomcat-7.0.59
Dec 14, 2015 12:18:28 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: CATALINA_HOME: C:\apache-tomcat-7.0.59-windows-x86\apache-tomcat-7.0.59
Dec 14, 2015 12:18:28 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dcatalina.base=C:\apache-tomcat-7.0.59-windows-x86\apache-tomcat-7.0.59
Dec 14, 2015 12:18:28 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dcatalina.home=C:\apache-tomcat-7.0.59-windows-x86\apache-tomcat-7.0.59
Dec 14, 2015 12:18:28 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dwtp.deploy=C:\apache-tomcat-7.0.59-windows-x86\apache-tomcat-7.0.59\wtpwebapps
Dec 14, 2015 12:18:28 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Djava.endorsed.dirs=C:\apache-tomcat-7.0.59-windows-x86\apache-tomcat-7.0.59\endorsed
Dec 14, 2015 12:18:28 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dorg.apache.el.parser.SKIP_IDENTIFIER_CHECK=true
Dec 14, 2015 12:18:28 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dfile.encoding=Cp1252
Dec 14, 2015 12:18:28 AM 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\jre7\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\Program Files\Broadcom\Broadcom 802.11 Network Adapter;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\WIDCOMM\Bluetooth Software\;C:\Program Files\WIDCOMM\Bluetooth Software\syswow64;C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x86;C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x64;C:\Program Files\Sony\VAIO Improvement;C:\Program Files (x86)\Sony\VAIO BIOS Data Transfer Utility\;C:\Program Files (x86)\Sony\VAIO Startup Setting Tool;C:\Program Files (x86)\Skype\Phone\;C:\Program Files (x86)\Git\cmd;C:\apache-maven-3.3.9\bin;.
Dec 14, 2015 12:18:29 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8090"]
Dec 14, 2015 12:18:29 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
Dec 14, 2015 12:18:29 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 982 ms
Dec 14, 2015 12:18:29 AM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Dec 14, 2015 12:18:29 AM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.59
Dec 14, 2015 12:18:31 AM org.apache.catalina.core.ApplicationContext log
INFO: No Spring WebApplicationInitializer types detected on classpath
Dec 14, 2015 12:18:31 AM org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring root WebApplicationContext
Dec 14, 2015 12:18:31 AM org.springframework.web.context.ContextLoader initWebApplicationContext
INFO: Root WebApplicationContext: initialization started
Dec 14, 2015 12:18:31 AM org.springframework.web.context.support.XmlWebApplicationContext prepareRefresh
INFO: Refreshing Root WebApplicationContext: startup date [Mon Dec 14 00:18:31 IST 2015]; root of context hierarchy
Dec 14, 2015 12:18:31 AM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
INFO: Loading XML bean definitions from class path resource [META-INF/spring/restws-service-context.xml]
Dec 14, 2015 12:18:31 AM org.springframework.web.context.ContextLoader initWebApplicationContext
INFO: Root WebApplicationContext: initialization completed in 509 ms
Dec 14, 2015 12:18:32 AM org.apache.catalina.util.SessionIdGeneratorBase createSecureRandom
INFO: Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [307] milliseconds.
Dec 14, 2015 12:18:32 AM org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring FrameworkServlet 'SpringFormValidation'
Dec 14, 2015 12:18:32 AM org.springframework.web.servlet.DispatcherServlet initServletBean
INFO: FrameworkServlet 'SpringFormValidation': initialization started
Dec 14, 2015 12:18:32 AM org.springframework.web.context.support.XmlWebApplicationContext prepareRefresh
INFO: Refreshing WebApplicationContext for namespace 'SpringFormValidation-servlet': startup date [Mon Dec 14 00:18:32 IST 2015]; parent: Root WebApplicationContext
Dec 14, 2015 12:18:32 AM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
INFO: Loading XML bean definitions from ServletContext resource [/WEB-INF/SpringFormValidation-servlet.xml]
Dec 14, 2015 12:18:32 AM org.springframework.web.servlet.handler.SimpleUrlHandlerMapping registerHandler
INFO: Mapped URL path [/results] onto handler of type [class org.springframework.web.servlet.mvc.ParameterizableViewController]
Dec 14, 2015 12:18:33 AM org.springframework.web.servlet.DispatcherServlet initServletBean
INFO: FrameworkServlet 'SpringFormValidation': initialization completed in 854 ms
Dec 14, 2015 12:18:33 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\apache-tomcat-7.0.59-windows-x86\apache-tomcat-7.0.59\webapps\binoy
Dec 14, 2015 12:18:33 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory C:\apache-tomcat-7.0.59-windows-x86\apache-tomcat-7.0.59\webapps\binoy has finished in 92 ms
Dec 14, 2015 12:18:33 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\apache-tomcat-7.0.59-windows-x86\apache-tomcat-7.0.59\webapps\docs
Dec 14, 2015 12:18:33 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory C:\apache-tomcat-7.0.59-windows-x86\apache-tomcat-7.0.59\webapps\docs has finished in 78 ms
Dec 14, 2015 12:18:33 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\apache-tomcat-7.0.59-windows-x86\apache-tomcat-7.0.59\webapps\examples
Dec 14, 2015 12:18:33 AM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
Dec 14, 2015 12:18:33 AM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
Dec 14, 2015 12:18:33 AM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: attributeAdded('org.apache.jasper.compiler.TldLocationsCache', 'org.apache.jasper.compiler.TldLocationsCache#6c0f5c75')
Dec 14, 2015 12:18:33 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory C:\apache-tomcat-7.0.59-windows-x86\apache-tomcat-7.0.59\webapps\examples has finished in 591 ms
Dec 14, 2015 12:18:33 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\apache-tomcat-7.0.59-windows-x86\apache-tomcat-7.0.59\webapps\host-manager
Dec 14, 2015 12:18:34 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory C:\apache-tomcat-7.0.59-windows-x86\apache-tomcat-7.0.59\webapps\host-manager has finished in 96 ms
Dec 14, 2015 12:18:34 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\apache-tomcat-7.0.59-windows-x86\apache-tomcat-7.0.59\webapps\manager
Dec 14, 2015 12:18:34 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory C:\apache-tomcat-7.0.59-windows-x86\apache-tomcat-7.0.59\webapps\manager has finished in 219 ms
Dec 14, 2015 12:18:34 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\apache-tomcat-7.0.59-windows-x86\apache-tomcat-7.0.59\webapps\ROOT
Dec 14, 2015 12:18:34 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory C:\apache-tomcat-7.0.59-windows-x86\apache-tomcat-7.0.59\webapps\ROOT has finished in 70 ms
Dec 14, 2015 12:18:34 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8090"]
Dec 14, 2015 12:18:34 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-bio-8009"]
Dec 14, 2015 12:18:34 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 5288 ms
Dec 14, 2015 12:18:36 AM org.springframework.web.servlet.PageNotFound noHandlerFound
WARNING: No mapping found for HTTP request with URI [/SpringFormValidation/form] in DispatcherServlet with name 'SpringFormValidation'
Dec 14, 2015 12:18:38 AM org.springframework.web.servlet.PageNotFound noHandlerFound
WARNING: No mapping found for HTTP request with URI [/SpringFormValidation/form] in DispatcherServlet with name 'SpringFormValidation'
Dec 14, 2015 12:18:54 AM org.apache.catalina.core.StandardContext reload
INFO: Reloading Context with name [/SpringFormValidation] has started
Dec 14, 2015 12:18:54 AM org.apache.catalina.core.ApplicationContext log
INFO: Destroying Spring FrameworkServlet 'SpringFormValidation'
Dec 14, 2015 12:18:54 AM org.springframework.web.context.support.XmlWebApplicationContext doClose
INFO: Closing WebApplicationContext for namespace 'SpringFormValidation-servlet': startup date [Mon Dec 14 00:18:32 IST 2015]; parent: Root WebApplicationContext
Dec 14, 2015 12:18:54 AM org.apache.catalina.core.ApplicationContext log
INFO: Closing Spring root WebApplicationContext
Dec 14, 2015 12:18:54 AM org.springframework.web.context.support.XmlWebApplicationContext doClose
INFO: Closing Root WebApplicationContext: startup date [Mon Dec 14 00:18:31 IST 2015]; root of context hierarchy
Dec 14, 2015 12:18:55 AM org.apache.catalina.core.ApplicationContext log
INFO: No Spring WebApplicationInitializer types detected on classpath
Dec 14, 2015 12:18:55 AM org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring root WebApplicationContext
Dec 14, 2015 12:18:55 AM org.springframework.web.context.ContextLoader initWebApplicationContext
INFO: Root WebApplicationContext: initialization started
Dec 14, 2015 12:18:55 AM org.springframework.web.context.support.XmlWebApplicationContext prepareRefresh
INFO: Refreshing Root WebApplicationContext: startup date [Mon Dec 14 00:18:55 IST 2015]; root of context hierarchy
Dec 14, 2015 12:18:55 AM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
INFO: Loading XML bean definitions from class path resource [META-INF/spring/restws-service-context.xml]
Dec 14, 2015 12:18:56 AM org.springframework.web.context.ContextLoader initWebApplicationContext
INFO: Root WebApplicationContext: initialization completed in 478 ms
Dec 14, 2015 12:18:56 AM org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring FrameworkServlet 'SpringFormValidation'
Dec 14, 2015 12:18:56 AM org.springframework.web.servlet.DispatcherServlet initServletBean
INFO: FrameworkServlet 'SpringFormValidation': initialization started
Dec 14, 2015 12:18:56 AM org.springframework.web.context.support.XmlWebApplicationContext prepareRefresh
INFO: Refreshing WebApplicationContext for namespace 'SpringFormValidation-servlet': startup date [Mon Dec 14 00:18:56 IST 2015]; parent: Root WebApplicationContext
Dec 14, 2015 12:18:56 AM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
INFO: Loading XML bean definitions from ServletContext resource [/WEB-INF/SpringFormValidation-servlet.xml]
Dec 14, 2015 12:18:56 AM org.springframework.web.servlet.handler.SimpleUrlHandlerMapping registerHandler
INFO: Mapped URL path [/results] onto handler of type [class org.springframework.web.servlet.mvc.ParameterizableViewController]
Dec 14, 2015 12:18:56 AM org.springframework.web.servlet.DispatcherServlet initServletBean
INFO: FrameworkServlet 'SpringFormValidation': initialization completed in 638 ms
Dec 14, 2015 12:18:56 AM org.apache.catalina.core.StandardContext reload
INFO: Reloading Context with name [/SpringFormValidation] is completed
Dec 14, 2015 1:16:21 AM org.springframework.web.servlet.PageNotFound noHandlerFound
WARNING: No mapping found for HTTP request with URI [/SpringFormValidation/form] in DispatcherServlet with name 'SpringFormValidation'
I will appreciate your help.
Fixed it by adding annotation #EnableWebMvc in my controller. Thanks

Resources