JavaSercer Pages 5.2.2 Keep On Doing It ’til (Web hosting jsp)

JavaSercer Pages 5.2.2 Keep On Doing It ’til You Get It Right Okay, now you know how to set bean properties and you’re aware that beans often validate their values. It would be nice if this technique could be used to display the same form over and over until all required input is correct. You can do that with just a few changes, as shown in Example 5.4, the userinfo2.jsp page. Example 5.4. A JSP Page that Validates and Redisplays Until Correct (userinfo2.jsp) <%@ page language="java" contentType="text/html" %> <%-- Output list of values with invalid format, if any --%> <%-- Output form with submitted valid values --%>

Name: “>
Birth Date: “> (Use format yyyy-mm-dd)
Email Address: “> (Use format name@company.com)
Sex: “> (Male or female)
Lucky number: “> (A number between 1 and 100)

page 51
Quick Hint: If you are looking for best quality webspace to host and run your tomcat application check Vision tomcat hosting services

Comments are closed.