String oldpw = request.getParameter("oldpw");
String newpw;

// Did the user enter same value?
oldpw = request.getParameter("oldpw");
// If not,...