1 package org.jahia.bin; 2 3 import java.io.IOException ; 4 5 import javax.servlet.ServletException ; 6 import javax.servlet.http.HttpServletRequest ; 7 import javax.servlet.http.HttpServletResponse ; 8 9 import org.apache.struts.action.Action; 10 import org.apache.struts.action.ActionForm; 11 import org.apache.struts.action.ActionForward; 12 import org.apache.struts.action.ActionMapping; 13 import org.jahia.operations.OperationManager; 14 import org.jahia.params.ParamBean; 15 16 21 public final class JahiaAction extends Action { 22 private static org.apache.log4j.Logger logger = 23 org.apache.log4j.Logger.getLogger(JahiaAction.class); 24 39 public ActionForward execute(ActionMapping mapping, 40 ActionForm form, 41 HttpServletRequest request, 42 HttpServletResponse response) 43 throws Exception { 44 45 try { 46 OperationManager operations = new OperationManager(); 48 ParamBean jParams = (ParamBean) 49 request.getAttribute("org.jahia.params.ParamBean"); 50 operations.handleOperations (jParams,Jahia.getSettings()); 51 } catch ( Throwable t ){ 52 logger.error("Error", JahiaErrorDisplay.getNestedException(t)); 53 JahiaErrorDisplay.DisplayException(request, response, servlet.getServletContext(), Jahia.getSettings(), t); 55 request.setAttribute(JahiaErrorDisplay.DISPLAY_JAHIA_ERROR, 56 Boolean.FALSE); 57 throw new Exception (t); 58 } 59 return null; 60 } 61 62 } 63 | Popular Tags |