Java - JSP - Register

Creating a register jsp webpage in java.

Page

<%-- 
    Document   : register
    Created on : Oct 21, 2014, 11:14:13 AM
    Author     : Steven Bartsch
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <link rel="stylesheet" type="text/css" href="style.css"/>
        <script src="js/location.js"></script>
        <title>Register</title>
    </head>
    <body>
        <div id="home">
            <div id="header">
                <div class="logo"><img src="images/bone_logo.png"/></div>
            </div>
            <div id="register">
                <form name="register" method="post" action="register">
                    <input type="text" 
                           name="username" 
                           placeholder="username" 
                           maxlength="20" 
                           pattern=".{3,20}" 
                           oninvalid="setCustomValidity('The username must be 3 to 20 characters long.')" 
                           onchange="try{setCustomValidity('')}catch(e){}" 
                           required/><br/>

                    <input type="password" 
                           name="password" 
                           placeholder="password" 
                           maxlength="30" 
                           pattern=".{3,30}" 
                           oninvalid="setCustomValidity('The password must be 3 to 30 characters long.')" 
                           onchange="try{setCustomValidity('')}catch(e){}" 
                           required/><br/>

                    <input type="text" 
                           name="email" 
                           placeholder="email" 
                           maxlength="100" 
                           pattern=".{4,100}" 
                           oninvalid="setCustomValidity('The email must be 4 to 100 characters long.')" 
                           onchange="try{setCustomValidity('')}catch(e){}" 
                           required/><br/>
                    <hr>
                    <input type="text" 
                           name="firstname" 
                           placeholder="first name" 
                           maxlength="30" 
                           pattern="[A-Z][a-z]+" 
                           oninvalid="setCustomValidity('The first name can only contain letters and a maximum length of 30. The first letter must be capitalized.')" 
                           onchange="try{setCustomValidity('')}catch(e){}" 
                           required/><br/>

                    <input type="text" 
                           name="lastname" 
                           placeholder="last name"
                           maxlength="40" 
                           pattern="[A-Z][a-z]+" 
                           oninvalid="setCustomValidity('The last name can only contain letters and a maximum length of 40. The first letter must be capitalized.')" 
                           onchange="try{setCustomValidity('')}catch(e){}" 
                           required/><br/>

                    <input type="text" 
                           name="phone" 
                           placeholder="phone number" 
                           maxlength="10" 
                           pattern="[0-9]+" 
                           oninvalid="setCustomValidity('The phone number can only contain numbers and a maximum length of 10.')" 
                           onchange="try{setCustomValidity('')}catch(e){}" 
                           required/><br/>
                    <hr>
                    <input type="text" 
                           name="street" 
                           placeholder="street address" 
                           maxlength="60" oninvalid="setCustomValidity('The street address can only contain 60 characters.')" 
                           onchange="try{setCustomValidity('')}catch(e){}" 
                           required/><br/>

                    <input type="text" 
                           name="postalcode" 
                           placeholder="postal code ex. K7K??? - K7P???" 
                           maxlength="6" onkeyup="findLocation()" 
                           pattern="[A-Z][0-9][A-Z][0-9][A-Z][0-9]" 
                           oninvalid="setCustomValidity('The street address can only contain 60 characters. The format it must follow L1L2L3.')" 
                           onchange="try{setCustomValidity('')}catch(e){}" 
                           required/><br/>
                    <div id="location">
                        <input type="text" name="city" disabled/>
                        <input type="text" name="province" disabled/>
                    </div>
                    <hr>
                    <input type="submit" name="submit" value="Register"/>
                </form>
            </div>
        </div>
    </body>
</html>