1 4 package com.opensymphony.webwork.portlet.servlet; 5 6 import com.opensymphony.xwork.ActionContext; 7 import com.opensymphony.xwork.util.OgnlValueStack; 8 9 import javax.servlet.RequestDispatcher ; 10 import javax.servlet.ServletException ; 11 import javax.servlet.http.HttpServletRequest ; 12 import javax.servlet.http.HttpServletResponse ; 13 import java.io.IOException ; 14 15 30 public class WebWorkJSPServlet extends WebWorkAbstractServlet { 31 32 35 public WebWorkJSPServlet() { 36 super(); 37 } 38 39 42 protected void doRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException , IOException { 43 44 String location = (String ) ActionContext.getContext().get("template"); 45 46 OgnlValueStack stack = ActionContext.getContext().getValueStack(); 47 48 54 RequestDispatcher dispatcher = request.getRequestDispatcher(location); 55 56 if (dispatcher == null) { 58 response.sendError(404, "result '" + location + "' not found"); 59 return; 60 } 61 62 dispatcher.include(request, response); 63 64 } 65 66 } | Popular Tags |