1 package org.itracker.web.actions; 2 3 import org.apache.struts.action.ActionForm; 4 import org.apache.struts.action.ActionForward; 5 import org.apache.struts.action.ActionMapping; 6 import org.itracker.services.ProjectService; 7 import org.itracker.web.actions.base.ItrackerBaseAction; 8 import org.itracker.web.util.ServletContextUtils; 9 10 import javax.servlet.http.HttpServletRequest; 11 import javax.servlet.http.HttpServletResponse; 12 13 14 public class ListProjectsAction extends ItrackerBaseAction { 15 16 public ActionForward execute(ActionMapping mapping, ActionForm form, 17 HttpServletRequest request, HttpServletResponse response) 18 throws Exception { 19 20 ProjectService projectService = ServletContextUtils.getItrackerServices().getProjectService(); 21 request.setAttribute("ph", projectService); 22 return new ActionForward("listprojects"); 23 } 24 25 public ListProjectsAction() { 26 super(); 27 28 } 29 30 31 }