1 5 6 package com.raptus.owxv3.api.components; 7 8 import java.io.IOException ; 9 10 import javax.servlet.ServletException ; 11 import javax.servlet.http.*; 12 13 import org.apache.struts.action.*; 14 15 import com.raptus.owxv3.*; 16 import com.raptus.owxv3.api.OmniaWebAction; 17 18 40 public class ComponentAction extends OmniaWebAction 41 { 42 57 public ActionForward perform(ActionMapping mapping, 58 ActionForm form, 59 HttpServletRequest request, 60 HttpServletResponse response) 61 throws IOException , ServletException 62 { 63 HttpSession session = request.getSession(); 64 com.raptus.owxv3.api.usermgr.User user= checkForUserInSession(session); 65 if(user == null) 66 { 67 LoggingManager.log("Cannot find user in session. Displaying login screen.", this); 68 return mapping.findForward(Constants.SCREEN_LOGIN); 69 } 70 71 ActionForward myFwd = new ActionForward(); 72 if(form != null) 73 { 74 ComponentContainer cc = ((ComponentBean) form).getContainer(); 75 if(cc != null) 76 { 77 myFwd.setName(ComponentConstants.COMPONENT_FWD_TEMPORARY); 78 myFwd.setPath(cc.getURI()); 79 myFwd.setRedirect(false); 82 dispatchComponent(request, (ComponentBean) form); 83 } 84 } 85 86 return myFwd; 87 } 88 89 92 public void dispatchComponent(HttpServletRequest request, 93 ComponentBean cbean) 94 { 95 } 96 97 } 98 99 | Popular Tags |