int limit = Integer.parseInt(req.getParameter("sel1_"+names[i]));
int weight = 0;
if(!"overall".equals(names[i]))
weight = Integer.parseInt(req.getParameter("sel2_"+names[i]));
UserRecommendationPrefs urp = new UserRecommendationPrefs(names[i], limit, weight);
urp.saveUserRecommendationPrefs(person);
}
}
resp.sendRedirect(((req.getContextPath() != null)?req.getContextPath():"")+"/profile/"); //maybe some parameter saying that data have changed?
}