JSP - Beginner question , Bypass the if..statement on page load?
- by TatMing
i am new in JSP,i have some problem with the following code :
    <%@ page contentType="text/html;charset=Big5" %>
<html>
    <head>
    <title></title>
    </head>
    <body>
        <form method="post" action="InsertStudent.jsp">
    <input type="text" size="20" name="txtName" />
    <input type="text" size="20" name="txtDob" />
    <input type="text" size="20" name="txtProStudied" />
    <input type="submit" name="B1" value="Submit" />     
        </form>
<% 
  if (request.getParameter("txtName") !="" && request.getParameter("txtDob") != "" && request.getParameter("txtProStudied") != "" ) {
              out.println("...bypass the if....statement");               
  }
%>
    </body>
</html>
If run this code, the out.println will fire even the 3 input box have value or not..