KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > exoplatform > portal > portlet > struts > ExoActionServlet


1 package org.exoplatform.portal.portlet.struts;
2
3 import java.io.IOException JavaDoc ;
4 import javax.servlet.ServletException JavaDoc;
5 import javax.servlet.UnavailableException JavaDoc;
6 import javax.servlet.http.HttpServlet JavaDoc;
7 import javax.servlet.http.HttpServletRequest JavaDoc;
8 import javax.servlet.http.HttpServletResponse JavaDoc;
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 JavaDoc request, HttpServletResponse JavaDoc response) throws IOException JavaDoc, ServletException JavaDoc {
16     String JavaDoc requestUri = (String JavaDoc) 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 JavaDoc {
25     super.initServlet();
26     getServletContext().setAttribute(Globals.SERVLET_KEY, "*.do");
27   }
28 }
29
Popular Tags