for (final Registration registration : rootDomainObject.getStudentsSet()) {
for (final Registration registration : rootDomainObject.getRegistrationsSet()) {
    public ActionForward listStudents(ActionMapping mapping, ActionForm actionForm,            HttpServletRequest request, HttpServletResponse response) throws Exception {    	final SortedMap<Degree, SortedSet<Homepage>> homepages = new TreeMap<Degree, SortedSet<Homepage>>(Degree.DEGREE_COMPARATOR_BY_NAME_AND_DEGREE_TYPE);    	for (final Registration registration : rootDomainObject.getStudentsSet()) {    		final StudentCurricularPlan studentCurricularPlan = registration.getActiveStudentCurricularPlan();    		if (studentCurricularPlan != null) {    			final DegreeCurricularPlan degreeCurricularPlan = studentCurricularPlan.getDegreeCurricularPlan();    			final Degree degree = degreeCurricularPlan.getDegree();    			final Person person = registration.getPerson();    			final SortedSet<Homepage> degreeHomepages;				if (homepages.containsKey(degree)) {					degreeHomepages = homepages.get(degree);				} else {					degreeHomepages = new TreeSet<Homepage>(Homepage.HOMEPAGE_COMPARATOR_BY_NAME);					homepages.put(degree, degreeHomepages);				}				final Homepage homepage = person.getHomepage();				if (homepage != null && homepage.getActivated().booleanValue()) {					degreeHomepages.add(homepage);				}    		}    	}    	request.setAttribute("homepages", homepages);    	final String selectedPage = request.getParameter("selectedPage");    	if (selectedPage != null) {    		request.setAttribute("selectedPage", selectedPage);    	}        return mapping.findForward("list-homepages-students");    }