title: Spring MVC project - take input of form and return results of Java method on same page
body: <p>This is my first MVC project, so I'm sorry that this question is so basic! But, I have a function that takes in a URL and returns information about it in the form of Strings. On my home.jsp page I want to have a form that allows the user to input the URL and have the information returned on the same page. How should I go about doing this? I have a HomeController that came with my project template--I don't know if I need a special controller?</p>
  
  <p>So far, I have:</p>
  
  <p>home.jsp</p>
  
  <pre><code>&lt;form:form method="post" action="getTumblrData" commandName="tumblrInfo"&gt;
      &lt;input name="url" type="text"/&gt; 
      &lt;input type="submit" value="send"/&gt;
  &lt;/form:form&gt;
  &lt;div id="returnedInfo"&gt;
  &lt;!-- return data should go here --&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>tumblrInfo.java</p>
  
  <pre><code>public class tumblrInfo {
      private String blogname;
      public String getBlogName() {
          return blogname;
      }
      public void setName(String name) {
          this.blogname = name;
      }
  }
  </code></pre>
  
  <p>HomeController.java</p>
  
  <pre><code>public String UrlReader(String url) {
     String blogName;
     ...
     return blogName;
  }
  
  @RequestMapping("/home")
  public String getTumblrData(@ModelAttribute("tumblrInfo") tumblrInfo data, Map&lt;String, Object&gt; map, HttpServletRequest request) {
   String blogName = UrlReader(data.getURL());
   return blogName???
   }
  </code></pre>
  
  <p>Obviously when I run the program and click submit nothing happens. Can someone point me in the right direction? I am comfortable with html/javascript/jquery, if those are needed. I'm a little overwhelmed with the MVC framework libraries right now.</p>