title: How to pass text field value from jsp to java class
body: <p>How to pass text field value from jsp to java class.</p>
  
  <p>my <strong>.jsp</strong> code is</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;&lt;/head&gt;
  &lt;body&gt;
      &lt;FORM&gt;
          Please enter your name:
          &lt;INPUT TYPE="TEXT" NAME="text1"&gt;
          &lt;BR&gt;
          &lt;INPUT TYPE="SUBMIT" value="Submit"&gt;
      &lt;/FORM&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>my <strong>.java</strong> class code is</p>
  
  <p>here in string str i need to get the textfield value.</p>
  
  <pre><code>class sample{
  
      String str="";    //C:/check/svntes
  
      File exportDir = new File(str);
      if (exportDir.exists()) {
          SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.IO_ERROR, "Path ''{0}'' already exists", exportDir);
          throw new SVNException(err);
      }
      exportDir.mkdirs();
  }
  </code></pre>