title: how to transfer prompt box input data to serlvet?
body: <p>I would like to transfer prompt box input data to servlet.
  My process is calling the javascript function for form validation. If the form data is valid, I'll ask the common name by prompt box. I want to transfer with this name to the servlet and I'll get this name by the servlet.
  Is this process true or not? If true, how do I transfer this prompt box input data to servlet? I didn't use Ajax.</p>
  
  <p><strong>ံJSP Code:</strong> </p>
  
  <pre><code>&lt;html&gt;
      &lt;head&gt;
      &lt;title&gt;TESTING!!!&lt;/title&gt;
      &lt;script type="text/javascript"&gt;
      function validateForm(){
       var email=document.frm.email.value;
       var password = document.frm.password.value;
       var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
  
       var result = true;
       if(email==null || email==""){
       alert("fill email address");
      document.frm.email.focus();
      result = false;
      }else if(file==null || file == "" ){
      alert("choose file");
      document.frm.fName.focus();
      result = false;
      }else if(password==null || password == "" ){
      alert("fill password");
      document.frm.password.focus();
      result = false;
      }else if (reg.test(email)==false){
      alert("Not a valid e-mail address");
      document.frm.email.focus();
      result = false;
      }else{
       var cn = prompt('Common Name', '');
       if(cn) alert("Common Name is " +cn);
       result = true;
      }
      return result;                  
      }
      &lt;/script&gt;
      &lt;/head&gt;
      &lt;body&gt;
      &lt;form name="frm" action="test" method="POST"
          enctype="multipart/form-data" onsubmit="return validateForm();"&gt;
      &lt;p&gt;Email : &lt;input type="text" name="email"&gt;&lt;/p&gt;
      &lt;p&gt;Password : &lt;input type="password" name="password"&gt;&lt;/p&gt;
      &lt;p&gt;&lt;input type="submit" value="Submit"&gt;&lt;/p&gt;
      &lt;/form&gt;
      &lt;/body&gt;
      &lt;/html&gt;
  </code></pre>