// See if they have submitted or just need the form if(request.method == "POST"){ // Perform your processing of the form here }else{ // Write the actual HTML form here }