title: Passing parameters from JSP to controller - Spring MVC
body: <p>I have a little problem when I want to pass parameter to my controller. 
  I have one method in controller:</p>
  
  <p><code>
      @RequestMapping("/redirect")</p>
  
  <pre><code>public String print(String type, HttpServletRequest servletRequest)
  {
      String path = "redirect:" + servletRequest.getParameter("type");
      return path;
  }
  </code></pre>
  
  <p></code></p>
  
  <p>And I have some buttons in my jsp file:</p>
  
  <pre><code>&lt;form method="post" action="/WWP/redirect"&gt;
  &lt;button onclick=" &lt;input type="text" name="type" value="/developer"/&gt;"&gt;Developer&lt;/button&gt;
  
  &lt;button onclick=&lt;input type="text" name="type" value="/graphic"/&gt;&gt;Graphic&lt;/button&gt;
  
  &lt;button onclick=" &lt;input type="text" name="type" value="/cleaner"/&gt;"&gt;Cleaner&lt;/button&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>In this way I have 3 buttons and when for example I press Developer button variable "type" is "/developer" and I'm sending it to controller. But now my buttons look like this:
  <a href="http://imageshack.us/photo/my-images/854/buttonspx.png/" rel="nofollow">http://imageshack.us/photo/my-images/854/buttonspx.png/</a></p>
  
  <p>It works correct, but I can't get rid this HTML tag and it's really nervous. How to do this? Or how send value to controller in different way. Thanks in advance.</p>