title: HTTP Status 400 - Required String parameter 'xx' is not present
body: <p>I'm trying to make a simple <strong>Spring MVC</strong> application. </p>
  
  <p>Here's my <code>HelloController</code></p>
  
  <pre><code>package com.springapp.mvc;
  import org.springframework.stereotype.Controller;
  import org.springframework.ui.ModelMap;
  import org.springframework.web.bind.annotation.PathVariable;
  import org.springframework.web.bind.annotation.RequestMapping;
  import org.springframework.web.bind.annotation.RequestMethod;
  import org.springframework.web.bind.annotation.RequestParam;
  
  
  @Controller
  @RequestMapping("/")
  public class HelloController {
  @RequestMapping(method = RequestMethod.GET)
  public String printWelcome(ModelMap model,@RequestParam(value = "xx",required
  =true)String xx) {
  
          model.addAttribute("message", "Hello Mahdi");
  
      return "hello";
  }
  }
  </code></pre>
  
  <p>and the <strong>JSP</strong> file:</p>
  
  <pre><code>&lt;html&gt;
  &lt;body&gt;
  &lt;h1&gt;${message}&lt;/h1&gt;
  &lt;form action="/" method="GET"&gt;
      &lt;input type="text" name="xx"&gt;
      &lt;button type="submit"&gt;submit&lt;/button&gt;
  &lt;/form&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>I'm getting the following error when I try to run the application:</p>
  
  <pre><code>HTTP Status 400 - Required String parameter 'xx' is not present
  </code></pre>
  
  <p>I'm new to <strong>Spring MVC</strong>, please help.</p>