String oldpw = request.getParameter("oldpw");
String newpw;
// Did the user enter same value?
oldpw = request.getParameter("oldpw");
// If not, use the drop-down list value
if ( (oldpw != newpw) ) {
// retrieve the "newpw" attribute from the session-scope
HttpSession session = request.getSession();
Anymodel model = (PwordChange)session.getAttribute("newpw");
newpwitem item = model.newpw(oldpw, newpw);
// Store the item on the request-scope
request.setAttribute("newpwitem ", item);
return mapping.findForward("success");
}