title: Error on creating first Hello world application using Spring mvc
body: <p>First of all, I want to apologize for maybe duplicate topic but I couldn't find the answer to my question.</p>
  
  <p>I started today with spring mvc and i have some issues with my "hello world" application. Can anyone help me make this program to work? Because i have followed some instructions and i have no clue how to solve this.</p>
  
  <p><a href="https://i.stack.imgur.com/RYXST.jpg" rel="noreferrer">This</a> is my project structure</p>
  
  <p><img src="https://i.stack.imgur.com/RYXST.jpg" alt="enter image description here"></p>
  
  <p>HelloController class</p>
  
  <pre><code>package com.pluralsight.controller;
  
  import org.springframework.stereotype.Controller;
  import org.springframework.ui.Model;
  import org.springframework.web.bind.annotation.RequestMapping;
  
  
  @Controller
  public class HelloController {
  
         @RequestMapping(value="/greeting.html")
         public String sayHello(Model model){
          model.addAttribute("greeting","Hello world");
  
          return "hello";
        }    
    }
  </code></pre>
  
  <p>hello.jsp</p>
  
  <pre><code>&lt;%@ page language="java" contentType="text/html; charset=ISO-8859-1"
      pageEncoding="ISO-8859-1"%&gt;
  &lt;!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"&gt;
  &lt;html&gt;
  &lt;head&gt;
       &lt;meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"&gt;
       &lt;title&gt;Insert title here&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;    
       &lt;h1&gt;${greeting}&lt;/h1&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>servlet-config.xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;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:mvc="http://www.springframework.org/schema/mvc"
      xmlns:p="http://www.springframework.org/schema/p"
      xsi:schemaLocation="http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.2.xsd
          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-3.2.xsd"&gt;
  
      &lt;mvc:annotation-driven/&gt;
      &lt;context:component-scan base-package="com.pluralsight.controller"/&gt;
  
      &lt;bean class="org.springframework.web.servlet.view.InternalResourceViewResolver" 
      p:prefix="/WEB-INF/jsp/" p:suffix=".jsp"&gt;&lt;/bean&gt;
  
  &lt;/beans&gt;
  </code></pre>
  
  <p>web.xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"&gt;
  
      &lt;!-- 1.create servlet --&gt;
      &lt;servlet&gt;
          &lt;!-- 1.1 we need a servlet name --&gt;
          &lt;servlet-name&gt;fitTrackerServlet&lt;/servlet-name&gt;
          &lt;!-- 1.2 we need a servlet class --&gt;
          &lt;servlet-class&gt;org.springframework.web.servlet.DispatcherServlet&lt;/servlet-class&gt;
          &lt;!-- 1.3 we need to specify the configuration file (default) --&gt;
          &lt;init-param&gt;
              &lt;param-name&gt;contextConfigLocation&lt;/param-name&gt;
              &lt;param-value&gt;/WEB-INF/config/servlet-config.xml&lt;/param-value&gt;
          &lt;/init-param&gt;
      &lt;/servlet&gt;
  
      &lt;!-- 2.servlet mapping --&gt;
      &lt;servlet-mapping&gt;
          &lt;servlet-name&gt;fitTrackerServlet&lt;/servlet-name&gt;
          &lt;url-pattern&gt;*.html&lt;/url-pattern&gt;
      &lt;/servlet-mapping&gt;
  
    &lt;display-name&gt;Archetype Created Web Application&lt;/display-name&gt;
  &lt;/web-app&gt;
  </code></pre>
  
  <p>and full stacktrace</p>
  
  <pre><code>Apr 08, 2014 8:30:17 PM org.apache.catalina.core.AprLifecycleListener init
  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\jre8\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;D:\app\Laura\product\12.1.0\dbhome_2\bin;D:\app\LauraPC\product\12.1.0\dbhome_1\bin;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\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 (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files\Microsoft SQL Server\110\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\ManagementStudio\;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\PrivateAssemblies\;C:\Program Files (x86)\Microsoft SQL Server\110\DTS\Binn\;C:\Program Files\apache-1.9.3\apache-ant-1.9.3\bin\;C:\Program Files\Java\jdk1.7.0_45\;C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Pages\v1.0\;C:\Program Files (x86)\Windows Kits\8.0\Windows Performance Toolkit\C:\Program Files\Java\jdk1.7.0_45\bin\javac\;C:\Program Files\Microsoft\Web Platform Installer\;C:\Users\Laura\android-sdks\tools\;C:\Program Files\Java\jdk1.7.0_45\bin;.
      Apr 08, 2014 8:30:17 PM org.apache.tomcat.util.digester.SetPropertiesRule begin
      WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.j2ee.server:FitTracker' did not find a matching property.
      Apr 08, 2014 8:30:17 PM org.apache.coyote.AbstractProtocol init
      INFO: Initializing ProtocolHandler ["http-bio-8080"]
      Apr 08, 2014 8:30:17 PM org.apache.coyote.AbstractProtocol init
      INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
      Apr 08, 2014 8:30:17 PM org.apache.catalina.startup.Catalina load
      INFO: Initialization processed in 606 ms
      Apr 08, 2014 8:30:17 PM org.apache.catalina.core.StandardService startInternal
      INFO: Starting service Catalina
      Apr 08, 2014 8:30:17 PM org.apache.catalina.core.StandardEngine startInternal
      INFO: Starting Servlet Engine: Apache Tomcat/7.0.47
      Apr 08, 2014 8:30:19 PM org.apache.catalina.core.ApplicationContext log
      INFO: No Spring WebApplicationInitializer types detected on classpath
      Apr 08, 2014 8:30:19 PM org.apache.coyote.AbstractProtocol start
      INFO: Starting ProtocolHandler ["http-bio-8080"]
      Apr 08, 2014 8:30:19 PM org.apache.coyote.AbstractProtocol start
      INFO: Starting ProtocolHandler ["ajp-bio-8009"]
      Apr 08, 2014 8:30:19 PM org.apache.catalina.startup.Catalina start
      INFO: Server startup in 1225 ms
      Apr 08, 2014 8:30:52 PM org.apache.catalina.core.ApplicationContext log
      INFO: Initializing Spring FrameworkServlet 'fitTrackerServlet'
      Apr 08, 2014 8:30:52 PM org.springframework.web.servlet.FrameworkServlet initServletBean
      INFO: FrameworkServlet 'fitTrackerServlet': initialization started
      Apr 08, 2014 8:30:52 PM org.springframework.context.support.AbstractApplicationContext prepareRefresh
      INFO: Refreshing WebApplicationContext for namespace 'fitTrackerServlet-servlet': startup date [Tue Apr 08 20:30:52 EEST 2014]; root of context hierarchy
      Apr 08, 2014 8:30:52 PM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
      INFO: Loading XML bean definitions from ServletContext resource [/WEB-INF/config/servlet-config.xml]
      Apr 08, 2014 8:30:52 PM org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider registerDefaultFilters
      INFO: JSR-250 'javax.annotation.ManagedBean' found and supported for component scanning
      Apr 08, 2014 8:30:52 PM org.springframework.web.servlet.FrameworkServlet initServletBean
      SEVERE: Context initialization failed
      java.lang.IllegalArgumentException
          at org.springframework.asm.ClassReader.&lt;init&gt;(Unknown Source)
          at org.springframework.asm.ClassReader.&lt;init&gt;(Unknown Source)
          at org.springframework.asm.ClassReader.&lt;init&gt;(Unknown Source)
          at org.springframework.core.type.classreading.SimpleMetadataReader.&lt;init&gt;(SimpleMetadataReader.java:52)
          at org.springframework.core.type.classreading.SimpleMetadataReaderFactory.getMetadataReader(SimpleMetadataReaderFactory.java:80)
          at org.springframework.core.type.classreading.CachingMetadataReaderFactory.getMetadataReader(CachingMetadataReaderFactory.java:101)
          at org.springframework.core.type.classreading.SimpleMetadataReaderFactory.getMetadataReader(SimpleMetadataReaderFactory.java:76)
          at org.springframework.context.annotation.ConfigurationClassParser.getImports(ConfigurationClassParser.java:298)
          at org.springframework.context.annotation.ConfigurationClassParser.getImports(ConfigurationClassParser.java:300)
          at org.springframework.context.annotation.ConfigurationClassParser.getImports(ConfigurationClassParser.java:300)
          at org.springframework.context.annotation.ConfigurationClassParser.doProcessConfigurationClass(ConfigurationClassParser.java:230)
          at org.springframework.context.annotation.ConfigurationClassParser.processConfigurationClass(ConfigurationClassParser.java:153)
          at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:130)
          at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:285)
          at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:223)
          at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:630)
          at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:461)
          at org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:647)
          at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:598)
          at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:661)
          at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:517)
          at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:458)
          at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:138)
          at javax.servlet.GenericServlet.init(GenericServlet.java:160)
          at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1280)
          at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1193)
          at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:865)
          at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:136)
          at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
          at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
          at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
          at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
          at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
          at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
          at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
          at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1041)
          at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:603)
          at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
          at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
          at java.lang.Thread.run(Unknown Source)
  
      Apr 08, 2014 8:30:52 PM org.apache.catalina.core.ApplicationContext log
      SEVERE: StandardWrapper.Throwable
      java.lang.IllegalArgumentException
          at org.springframework.asm.ClassReader.&lt;init&gt;(Unknown Source)
          at org.springframework.asm.ClassReader.&lt;init&gt;(Unknown Source)
          at org.springframework.asm.ClassReader.&lt;init&gt;(Unknown Source)
          at org.springframework.core.type.classreading.SimpleMetadataReader.&lt;init&gt;(SimpleMetadataReader.java:52)
          at org.springframework.core.type.classreading.SimpleMetadataReaderFactory.getMetadataReader(SimpleMetadataReaderFactory.java:80)
          at org.springframework.core.type.classreading.CachingMetadataReaderFactory.getMetadataReader(CachingMetadataReaderFactory.java:101)
          at org.springframework.core.type.classreading.SimpleMetadataReaderFactory.getMetadataReader(SimpleMetadataReaderFactory.java:76)
          at org.springframework.context.annotation.ConfigurationClassParser.getImports(ConfigurationClassParser.java:298)
          at org.springframework.context.annotation.ConfigurationClassParser.getImports(ConfigurationClassParser.java:300)
          at org.springframework.context.annotation.ConfigurationClassParser.getImports(ConfigurationClassParser.java:300)
          at org.springframework.context.annotation.ConfigurationClassParser.doProcessConfigurationClass(ConfigurationClassParser.java:230)
          at org.springframework.context.annotation.ConfigurationClassParser.processConfigurationClass(ConfigurationClassParser.java:153)
          at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:130)
          at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:285)
          at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:223)
          at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:630)
          at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:461)
          at org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:647)
          at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:598)
          at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:661)
          at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:517)
          at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:458)
          at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:138)
          at javax.servlet.GenericServlet.init(GenericServlet.java:160)
          at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1280)
          at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1193)
          at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:865)
          at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:136)
          at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
          at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
          at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
          at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
          at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
          at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
          at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
          at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1041)
          at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:603)
          at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
          at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
          at java.lang.Thread.run(Unknown Source)
  
      Apr 08, 2014 8:30:52 PM org.apache.catalina.core.StandardWrapperValve invoke
      SEVERE: Allocate exception for servlet fitTrackerServlet
      java.lang.IllegalArgumentException
          at org.springframework.asm.ClassReader.&lt;init&gt;(Unknown Source)
          at org.springframework.asm.ClassReader.&lt;init&gt;(Unknown Source)
          at org.springframework.asm.ClassReader.&lt;init&gt;(Unknown Source)
          at org.springframework.core.type.classreading.SimpleMetadataReader.&lt;init&gt;(SimpleMetadataReader.java:52)
          at org.springframework.core.type.classreading.SimpleMetadataReaderFactory.getMetadataReader(SimpleMetadataReaderFactory.java:80)
          at org.springframework.core.type.classreading.CachingMetadataReaderFactory.getMetadataReader(CachingMetadataReaderFactory.java:101)
          at org.springframework.core.type.classreading.SimpleMetadataReaderFactory.getMetadataReader(SimpleMetadataReaderFactory.java:76)
          at org.springframework.context.annotation.ConfigurationClassParser.getImports(ConfigurationClassParser.java:298)
          at org.springframework.context.annotation.ConfigurationClassParser.getImports(ConfigurationClassParser.java:300)
          at org.springframework.context.annotation.ConfigurationClassParser.getImports(ConfigurationClassParser.java:300)
          at org.springframework.context.annotation.ConfigurationClassParser.doProcessConfigurationClass(ConfigurationClassParser.java:230)
          at org.springframework.context.annotation.ConfigurationClassParser.processConfigurationClass(ConfigurationClassParser.java:153)
          at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:130)
          at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:285)
          at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:223)
          at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:630)
          at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:461)
          at org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:647)
          at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:598)
          at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:661)
          at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:517)
          at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:458)
          at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:138)
          at javax.servlet.GenericServlet.init(GenericServlet.java:160)
          at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1280)
          at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1193)
          at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:865)
          at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:136)
          at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
          at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
          at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
          at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
          at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
          at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
          at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
          at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1041)
          at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:603)
          at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
          at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
          at java.lang.Thread.run(Unknown Source)
  </code></pre>