title: Deploying a Spring MVC 3.1 aplication in Netbeans
body: <p>Hi happens that im doing a HElloWorld in netbeans using annotations but each time i deploy glassfish drops this Error:
  java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: org.apache.catalina.LifecycleException: org.xml.sax.SAXParseException; lineNumber: 13; columnNumber: 54; El prefijo "context" para el elemento "context:component-scan" no está enlazado.. Consulte server.log para obtener más información.</p>
  
  <p>This is my dispatcher-servlet`</p>
  
  <pre><code>&lt;context:component-scan base-package="Controllers" /&gt;
  &lt;mvc:annotation-driven /&gt;
  
  &lt;bean
  id="viewResolver"
  class="org.springframework.web.servlet.view.InternalResourceViewResolver" &gt;
  
  &lt;property
      name="viewClass"
      value="org.springframework.web.servlet.view.JstlView" /&gt;
  
  &lt;property
      name="suffix"
      value=".jsp" /&gt;
  &lt;/bean&gt;
  </code></pre>
  
  <p>This is my web.xml</p>
  
  <pre><code>&lt;web-app version="3.0" 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_3_0.xsd"&gt;
  &lt;context-param&gt;
      &lt;param-name&gt;contextConfigLocation&lt;/param-name&gt;
      &lt;param-value&gt;/WEB-INF/applicationContext.xml&lt;/param-value&gt;
  &lt;/context-param&gt;
  &lt;listener&gt;
      &lt;listener-class&gt;org.springframework.web.context.ContextLoaderListener&lt;/listener- class&gt;
  &lt;/listener&gt;
  &lt;servlet&gt;
      &lt;servlet-name&gt;dispatcher&lt;/servlet-name&gt;
      &lt;servlet-class&gt;org.springframework.web.servlet.DispatcherServlet&lt;/servlet-class&gt;
      &lt;load-on-startup&gt;2&lt;/load-on-startup&gt;
  &lt;/servlet&gt;
  &lt;servlet-mapping&gt;
      &lt;servlet-name&gt;dispatcher&lt;/servlet-name&gt;
      &lt;url-pattern&gt;*.htm&lt;/url-pattern&gt;
  &lt;/servlet-mapping&gt;
  &lt;session-config&gt;
      &lt;session-timeout&gt;
          30
      &lt;/session-timeout&gt;
  &lt;/session-config&gt;
  &lt;welcome-file-list&gt;
      &lt;welcome-file&gt;redirect.jsp&lt;/welcome-file&gt;
  &lt;/welcome-file-list&gt;
  </code></pre>
  
  <p>And this is my controller</p>
  
  <pre><code>package Controllers;
  
  import org.springframework.stereotype.Controller;
  import org.springframework.web.servlet.ModelAndView;
  import org.springframework.web.bind.annotation.RequestMapping;
  import org.springframework.web.bind.annotation.RequestMethod;
  
  @Controller
  @RequestMapping("/hello.htm")
  public class helloController {
  
  
  
  @RequestMapping(method=RequestMethod.GET)
  public ModelAndView helloWorld(){
  
  ModelAndView model = new ModelAndView("hello");
  
  return model;
  }  }  
  </code></pre>
  
  <p>As you see is very basic and really dont know where the mistake is. Anybody can help me?</p>