1 package org.exoplatform.portal.portlet.struts; 2 3 import java.io.IOException ; 4 import javax.servlet.ServletException ; 5 import javax.servlet.UnavailableException ; 6 import javax.servlet.http.HttpServlet ; 7 import javax.servlet.http.HttpServletRequest ; 8 import javax.servlet.http.HttpServletResponse ; 9 10 import org.apache.struts.Globals; 11 import org.apache.struts.action.ActionServlet ; 12 import org.apache.struts.util.RequestUtils; 13 14 public class ExoActionServlet extends ActionServlet { 15 protected void process(HttpServletRequest request, HttpServletResponse response) throws IOException , ServletException { 16 String requestUri = (String ) request.getAttribute("exo.forward") ; 17 if (requestUri != null) { 18 request.setAttribute("javax.servlet.include.servlet_path", requestUri) ; 19 } 20 RequestUtils.selectModule(request, getServletContext()); 21 getRequestProcessor(getModuleConfig(request)).process(request, response); 22 } 23 24 protected void initServlet() throws ServletException { 25 super.initServlet(); 26 getServletContext().setAttribute(Globals.SERVLET_KEY, "*.do"); 27 } 28 } 29 | Popular Tags |