title: Desciption - The origin server did not find a current representation for the target resource or is not willing to disclose that one exists
body: <p>HomeController page</p>
  <pre><code>package springmvc.controller;
  
  import org.springframework.stereotype.Controller;
  import org.springframework.web.bind.annotation.RequestMapping;
  
  @Controller
  public class HomeController {
      
      @RequestMapping(&quot;/home&quot;)
      public String home() {
          System.out.println(&quot;This is home url&quot;);
          return &quot;index&quot;;
      }
      
  }
  </code></pre>
  <p>spring-servlet.xml file</p>
  <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
  &lt;beans xmlns=&quot;http://www.springframework.org/schema/beans&quot;
      xmlns:xsi=&quot;http://www.w3.org/2001/XMLScehma-instance&quot;
      xmlns:context=&quot;http://www.springframework.org/schema/context&quot;
      xmlns:p=&quot;http://www.springframework.org/schema/p&quot;
      xsi:schemaLocation=&quot;http://www.springframework.org/schema/beans
      http://www.springframework.org/schema/beans/spring-beans.xsd
      http://www.springframework.org/schema/context
      http://www.springframework.org/schema/context/spring-context.xsd&quot;&gt;
      
      &lt;context:component-scan base-package=&quot;springmvc.controller&quot;&gt;&lt;/context:component-scan&gt;
      
      &lt;bean class=&quot;org.springframework.web.servlet.view.InternalResourceViewResolver&quot; name=&quot;viewResolver&quot;&gt;
      
          &lt;property name=&quot;prefix&quot; value=&quot;/WEB-INF/views/&quot;/&gt;
          &lt;property name=&quot;suffix&quot; value=&quot;.jsp&quot; /&gt;
      &lt;/bean&gt;
      
      &lt;/beans&gt;
  </code></pre>
  <p>web.xml file</p>
  <pre><code>&lt;!DOCTYPE web-app PUBLIC
   &quot;-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN&quot;
   &quot;http://java.sun.com/dtd/web-app_2_3.dtd&quot; &gt;
  
  &lt;web-app&gt;
      &lt;display-name&gt;Archetype Created Web Application&lt;/display-name&gt;
  
  
      &lt;servlet&gt;
          &lt;servlet-name&gt;spring&lt;/servlet-name&gt;
          &lt;servlet-class&gt;org.springframework.web.servlet.DispatcherServlet&lt;/servlet-class&gt;
          &lt;load-on-startup&gt;1&lt;/load-on-startup&gt;
      &lt;/servlet&gt;
      &lt;servlet-mapping&gt;
          &lt;servlet-name&gt;spring&lt;/servlet-name&gt;
          &lt;url-pattern&gt;/&lt;/url-pattern&gt;
          
      &lt;/servlet-mapping&gt;
  &lt;/web-app&gt;
  </code></pre>
  <p>index.jsp page</p>
  <pre><code>&lt;%@ page language=&quot;java&quot; contentType=&quot;text/html; charset=ISO-8859-1&quot;
      pageEncoding=&quot;ISO-8859-1&quot;%&gt;
  &lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
  &lt;meta charset=&quot;ISO-8859-1&quot;&gt;
  &lt;title&gt;Home Page&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;h1&gt;This is home page&lt;/h1&gt;
      &lt;h1&gt;Called by home controller&lt;/h1&gt;
      &lt;h1&gt;url /home&lt;/h1&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  <p>pom.xml file</p>
  <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
  
  &lt;project xmlns=&quot;http://maven.apache.org/POM/4.0.0&quot;
      xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
      xsi:schemaLocation=&quot;http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd&quot;&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  
      &lt;groupId&gt;com.spring.mvc&lt;/groupId&gt;
      &lt;artifactId&gt;springmvc&lt;/artifactId&gt;
      &lt;version&gt;1.0.0&lt;/version&gt;
      &lt;packaging&gt;war&lt;/packaging&gt;
  
      &lt;name&gt;springmvc Maven Webapp&lt;/name&gt;
      &lt;!-- FIXME change it to the project's website --&gt;
      &lt;url&gt;http://www.example.com&lt;/url&gt;
  
      &lt;properties&gt;
          &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
          &lt;maven.compiler.source&gt;1.7&lt;/maven.compiler.source&gt;
          &lt;maven.compiler.target&gt;1.7&lt;/maven.compiler.target&gt;
      &lt;/properties&gt;
  
      &lt;dependencies&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework&lt;/groupId&gt;
              &lt;artifactId&gt;spring-webmvc&lt;/artifactId&gt;
              &lt;version&gt;5.2.4.RELEASE&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;junit&lt;/groupId&gt;
              &lt;artifactId&gt;junit&lt;/artifactId&gt;
              &lt;version&gt;4.11&lt;/version&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
      &lt;/dependencies&gt;
  
      &lt;build&gt;
          &lt;finalName&gt;springmvc&lt;/finalName&gt;
          &lt;pluginManagement&gt;&lt;!-- lock down plugins versions to avoid using Maven 
                  defaults (may be moved to parent pom) --&gt;
              &lt;plugins&gt;
                  &lt;plugin&gt;
                      &lt;artifactId&gt;maven-clean-plugin&lt;/artifactId&gt;
                      &lt;version&gt;3.1.0&lt;/version&gt;
                  &lt;/plugin&gt;
                  &lt;!-- see http://maven.apache.org/ref/current/maven-core/default-bindings.html#Plugin_bindings_for_war_packaging --&gt;
                  &lt;plugin&gt;
                      &lt;artifactId&gt;maven-resources-plugin&lt;/artifactId&gt;
                      &lt;version&gt;3.0.2&lt;/version&gt;
                  &lt;/plugin&gt;
                  &lt;plugin&gt;
                      &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
                      &lt;version&gt;3.8.0&lt;/version&gt;
                  &lt;/plugin&gt;
                  &lt;plugin&gt;
                      &lt;artifactId&gt;maven-surefire-plugin&lt;/artifactId&gt;
                      &lt;version&gt;2.22.1&lt;/version&gt;
                  &lt;/plugin&gt;
                  &lt;plugin&gt;
                      &lt;artifactId&gt;maven-war-plugin&lt;/artifactId&gt;
                      &lt;version&gt;3.2.2&lt;/version&gt;
                  &lt;/plugin&gt;
                  &lt;plugin&gt;
                      &lt;artifactId&gt;maven-install-plugin&lt;/artifactId&gt;
                      &lt;version&gt;2.5.2&lt;/version&gt;
                  &lt;/plugin&gt;
                  &lt;plugin&gt;
                      &lt;artifactId&gt;maven-deploy-plugin&lt;/artifactId&gt;
                      &lt;version&gt;2.8.2&lt;/version&gt;
                  &lt;/plugin&gt;
              &lt;/plugins&gt;
          &lt;/pluginManagement&gt;
      &lt;/build&gt;
  &lt;/project&gt;
  </code></pre>
  <p>error</p>
  <pre><code>HTTP Status 404 – Not Found
  
  
  Type Status Report
  
  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/10.0.10
  </code></pre>
  <p>after running the project on server it shows http 404 error as shown above. I have tried other solutions given on stack overflow but none of them worked. I am following a playlist on youtube for learning spring mvc.</p>
  <p>when I used tomcat 8.5 it show error and in the console it is printing</p>
  <pre><code>Sep 06, 2021 10:16:38 AM org.apache.catalina.startup.Bootstrap initClassLoaders
  SEVERE: Class loader creation threw exception
  java.io.IOException: The filename, directory name, or volume label syntax is incorrect
      at java.base/java.io.WinNTFileSystem.canonicalize0(Native Method)
      at java.base/java.io.WinNTFileSystem.canonicalize(WinNTFileSystem.java:415)
      at java.base/java.io.File.getCanonicalPath(File.java:626)
      at java.base/java.io.File.getCanonicalFile(File.java:651)
      at org.apache.catalina.startup.ClassLoaderFactory.createClassLoader(ClassLoaderFactory.java:171)
      at org.apache.catalina.startup.Bootstrap.createClassLoader(Bootstrap.java:150)
      at org.apache.catalina.startup.Bootstrap.initClassLoaders(Bootstrap.java:91)
      at org.apache.catalina.startup.Bootstrap.init(Bootstrap.java:227)
      at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:426)
  </code></pre>
  <p>Catalina.properties</p>
  <pre><code># Licensed to the Apache Software Foundation (ASF) under one or more
  # contributor license agreements.  See the NOTICE file distributed with
  # this work for additional information regarding copyright ownership.
  # The ASF licenses this file to You under the Apache License, Version 2.0
  # (the &quot;License&quot;); you may not use this file except in compliance with
  # the License.  You may obtain a copy of the License at
  #
  #     http://www.apache.org/licenses/LICENSE-2.0
  #
  # Unless required by applicable law or agreed to in writing, software
  # distributed under the License is distributed on an &quot;AS IS&quot; BASIS,
  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  # See the License for the specific language governing permissions and
  # limitations under the License.
  
  #
  # List of comma-separated packages that start with or equal this string
  # will cause a security exception to be thrown when
  # passed to checkPackageAccess unless the
  # corresponding RuntimePermission (&quot;accessClassInPackage.&quot;+package) has
  # been granted.
  package.access=sun.,org.apache.catalina.,org.apache.coyote.,org.apache.jasper.,org.apache.tomcat.
  #
  # List of comma-separated packages that start with or equal this string
  # will cause a security exception to be thrown when
  # passed to checkPackageDefinition unless the
  # corresponding RuntimePermission (&quot;defineClassInPackage.&quot;+package) has
  # been granted.
  #
  # by default, no packages are restricted for definition, and none of
  # the class loaders supplied with the JDK call checkPackageDefinition.
  #
  package.definition=sun.,java.,org.apache.catalina.,org.apache.coyote.,\
  org.apache.jasper.,org.apache.naming.,org.apache.tomcat.
  
  #
  #
  # List of comma-separated paths defining the contents of the &quot;common&quot;
  # classloader. Prefixes should be used to define what is the repository type.
  # Path may be relative to the CATALINA_HOME or CATALINA_BASE path or absolute.
  # If left as blank,the JVM system loader will be used as Catalina's &quot;common&quot;
  # loader.
  # Examples:
  #     &quot;foo&quot;: Add this folder as a class repository
  #     &quot;foo/*.jar&quot;: Add all the JARs of the specified folder as class
  #                  repositories
  #     &quot;foo/bar.jar&quot;: Add bar.jar as a class repository
  #
  # Note: Values are enclosed in double quotes (&quot;...&quot;) in case either the
  #       ${catalina.base} path or the ${catalina.home} path contains a comma.
  #       Because double quotes are used for quoting, the double quote character
  #       may not appear in a path.
  common.loader=&quot;${catalina.base}/lib&quot;,&quot;${catalina.base}/lib/*.jar&quot;,&quot;${catalina.home}/lib&quot;,&quot;${catalina.home}/lib/*.jar&quot;
  
  #
  # List of comma-separated paths defining the contents of the &quot;server&quot;
  # classloader. Prefixes should be used to define what is the repository type.
  # Path may be relative to the CATALINA_HOME or CATALINA_BASE path or absolute.
  # If left as blank, the &quot;common&quot; loader will be used as Catalina's &quot;server&quot;
  # loader.
  # Examples:
  #     &quot;foo&quot;: Add this folder as a class repository
  #     &quot;foo/*.jar&quot;: Add all the JARs of the specified folder as class
  #                  repositories
  #     &quot;foo/bar.jar&quot;: Add bar.jar as a class repository
  #
  # Note: Values may be enclosed in double quotes (&quot;...&quot;) in case either the
  #       ${catalina.base} path or the ${catalina.home} path contains a comma.
  #       Because double quotes are used for quoting, the double quote character
  #       may not appear in a path.
  server.loader=
  
  #
  # List of comma-separated paths defining the contents of the &quot;shared&quot;
  # classloader. Prefixes should be used to define what is the repository type.
  # Path may be relative to the CATALINA_BASE path or absolute. If left as blank,
  # the &quot;common&quot; loader will be used as Catalina's &quot;shared&quot; loader.
  # Examples:
  #     &quot;foo&quot;: Add this folder as a class repository
  #     &quot;foo/*.jar&quot;: Add all the JARs of the specified folder as class
  #                  repositories
  #     &quot;foo/bar.jar&quot;: Add bar.jar as a class repository
  # Please note that for single jars, e.g. bar.jar, you need the URL form
  # starting with file:.
  #
  # Note: Values may be enclosed in double quotes (&quot;...&quot;) in case either the
  #       ${catalina.base} path or the ${catalina.home} path contains a comma.
  #       Because double quotes are used for quoting, the double quote character
  #       may not appear in a path.
  shared.loader=
  
  # Default list of JAR files that should not be scanned using the JarScanner
  # functionality. This is typically used to scan JARs for configuration
  # information. JARs that do not contain such information may be excluded from
  # the scan to speed up the scanning process. This is the default list. JARs on
  # this list are excluded from all scans. The list must be a comma separated list
  # of JAR file names.
  # The list of JARs to skip may be over-ridden at a Context level for individual
  # scan types by configuring a JarScanner with a nested JarScanFilter.
  # The JARs listed below include:
  # - Tomcat Bootstrap JARs
  # - Tomcat API JARs
  # - Catalina JARs
  # - Jasper JARs
  # - Tomcat JARs
  # - Common non-Tomcat JARs
  # - Test JARs (JUnit, Cobertura and dependencies)
  tomcat.util.scan.StandardJarScanFilter.jarsToSkip=\
  annotations-api.jar,\
  ant-junit*.jar,\
  ant-launcher.jar,\
  ant.jar,\
  asm-*.jar,\
  aspectj*.jar,\
  bootstrap.jar,\
  catalina-ant.jar,\
  catalina-ha.jar,\
  catalina-jmx-remote.jar,\
  catalina-storeconfig.jar,\
  catalina-tribes.jar,\
  catalina-ws.jar,\
  catalina.jar,\
  cglib-*.jar,\
  cobertura-*.jar,\
  commons-beanutils*.jar,\
  commons-codec*.jar,\
  commons-collections*.jar,\
  commons-daemon.jar,\
  commons-dbcp*.jar,\
  commons-digester*.jar,\
  commons-fileupload*.jar,\
  commons-httpclient*.jar,\
  commons-io*.jar,\
  commons-lang*.jar,\
  commons-logging*.jar,\
  commons-math*.jar,\
  commons-pool*.jar,\
  dom4j-*.jar,\
  easymock-*.jar,\
  ecj-*.jar,\
  el-api.jar,\
  geronimo-spec-jaxrpc*.jar,\
  h2*.jar,\
  hamcrest-*.jar,\
  hibernate*.jar,\
  httpclient*.jar,\
  icu4j-*.jar,\
  jasper-el.jar,\
  jasper.jar,\
  jaspic-api.jar,\
  jaxb-*.jar,\
  jaxen-*.jar,\
  jdom-*.jar,\
  jetty-*.jar,\
  jmx-tools.jar,\
  jmx.jar,\
  jsp-api.jar,\
  jstl.jar,\
  jta*.jar,\
  junit-*.jar,\
  junit.jar,\
  log4j*.jar,\
  mail*.jar,\
  objenesis-*.jar,\
  oraclepki.jar,\
  oro-*.jar,\
  servlet-api-*.jar,\
  servlet-api.jar,\
  slf4j*.jar,\
  taglibs-standard-spec-*.jar,\
  tagsoup-*.jar,\
  tomcat-api.jar,\
  tomcat-coyote.jar,\
  tomcat-dbcp.jar,\
  tomcat-i18n-*.jar,\
  tomcat-jdbc.jar,\
  tomcat-jni.jar,\
  tomcat-juli-adapters.jar,\
  tomcat-juli.jar,\
  tomcat-util-scan.jar,\
  tomcat-util.jar,\
  tomcat-websocket.jar,\
  tools.jar,\
  websocket-api.jar,\
  wsdl4j*.jar,\
  xercesImpl.jar,\
  xml-apis.jar,\
  xmlParserAPIs-*.jar,\
  xmlParserAPIs.jar,\
  xom-*.jar
  
  # Default list of JAR files that should be scanned that overrides the default
  # jarsToSkip list above. This is typically used to include a specific JAR that
  # has been excluded by a broad file name pattern in the jarsToSkip list.
  # The list of JARs to scan may be over-ridden at a Context level for individual
  # scan types by configuring a JarScanner with a nested JarScanFilter.
  tomcat.util.scan.StandardJarScanFilter.jarsToScan=\
  log4j-taglib*.jar,\
  log4j-web*.jar,\
  log4javascript*.jar,\
  slf4j-taglib*.jar
  
  # String cache configuration.
  tomcat.util.buf.StringCache.byte.enabled=true
  #tomcat.util.buf.StringCache.char.enabled=true
  #tomcat.util.buf.StringCache.trainThreshold=500000
  #tomcat.util.buf.StringCache.cacheSize=5000
  
  # This system property is deprecated. Use the relaxedPathChars relaxedQueryChars
  # attributes of the Connector instead. These attributes permit a wider range of
  # characters to be configured as valid.
  # Allow for changes to HTTP request validation
  # WARNING: Using this option may expose the server to CVE-2016-6816
  #tomcat.util.http.parser.HttpParser.requestTargetAllow=|
  </code></pre>