title: Call a post method from a controller method (using url pattern)
body: <p>I have the following form</p>
  
  <pre><code>&lt;form name="fbForm" action="myIp/projectName/ControllerName/method" method="post"&gt;
  
      &lt;input type="hidden" value="1" name="username"&gt;
      &lt;input type="hidden" value="2" name="email"&gt;
      &lt;input type="hidden" value="3" name="dob"&gt;
      &lt;input type="hidden" value="4" name="sex"&gt;
          &lt;input type="submit" value="submit" /&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>My Controller Method</p>
  
  <pre><code>@RequestMapping(value = "/method" , method = RequestMethod.POST)
  public String signup(@RequestParam String username,@RequestParam String email,@RequestParam String dob,@RequestParam String sex) {
  
      System.out.println(username);
      System.out.println(email);
      System.out.println(dob);
      System.out.println(sex);
  
      return "test";
  }
  </code></pre>
  
  <p>If i click on the submit button in the form it works fine and prints desired output.
  Now what i am trying to do is call this signup method from another controller method</p>
  
  <p>e.g.</p>
  
  <pre><code>@RequestMapping(value = "/anotherMethod" )
  public void callSignup() {
  
      // code to call signup using url pattern (ControllerName/method) method from here with (username,email,dob,sex)
  
  }
  </code></pre>
  
  <p>is it possible?? How can i do this?</p>
  
  <p>Please answer with example code</p>
  
  <p>Sorry I could not ask the question properly. I don't need to call the method by method name but by the url pattern</p>
  
  <p>so the call should be made to <code>ControllerName/method</code> not <code>signup()</code> </p>