Question III (5 marks): Explain what is the name of the SQL prevention used below? (3 pts) And how does it work? (2 pts)
public void doPost(HttpServletRequest request, HttpServletResponse response) {
try {
String zipCode = request.getParameter("zip");
if (!zipPattern.matcher(zipCode).matches()) {
throw new YourValidationException("Improper zipcode format.");
}
// do what you want here, after it has been validated
} catch (YourValidationException e) {
response.sendError(response.SC_BAD_REQUEST, e.getMessage());
}
}