Source Code : Form TextField Demo

Java Is Open Source Programming Language You Can Download From Java and Java Libraries From http://www.oracle.com. Click Here to download
We provide this code related to title for you to solve your developing problem easily. Libraries which is import in this program you can download from http://www.oracle.com. Click Here or search from google with Libraries Name you get jar file related it

Form TextField Demo

//File: index.html
<html>
  <body>
    <h1>Hello Web Application</h1>
    <form action="hello.jsp" method="POST" >
      <table width="75%">
        <tr> 
          <td width="48%">What is your name?</td>
          <td width="52%">
            <input type="text" name="name" />
          </td>
        </tr>
      </table>
      <p> 
        <input type="submit" name="Submit" value="Submit name" />
        <input type="reset" name="Reset" value="Reset form" />
      </p>
    </form>
  </body>
</html>

//File: hello.jsp
<html>
  <head>
    <title>Hello Web Application</title>
  </head>
  <body>
    <h1>Hello Web Application</h1>
    <br/><br/>

    <%
    String name   = request.getParameter("name");
    if (name.trim().length() == 0) {
    %>
      You did not tell me your name!<br><br><br>
    <%
    } else {
    %>
      Hello <%=name%><br><br><br> 
    <%
    }
    %>
    <a href="index.html">Try again?</a>
  </body>
</html>


           
       

Thank with us