001 package railo.loader.servlet; 002 003 import java.io.IOException; 004 005 import javax.servlet.ServletConfig; 006 import javax.servlet.ServletException; 007 import javax.servlet.http.HttpServletRequest; 008 import javax.servlet.http.HttpServletResponse; 009 010 import railo.loader.engine.CFMLEngineFactory; 011 012 /** 013 */ 014 public class AMFServlet extends RailoServlet { 015 016 private static final long serialVersionUID = 2545934355390532318L; 017 018 /** 019 * @see javax.servlet.Servlet#init(javax.servlet.ServletConfig) 020 */ 021 public void init(ServletConfig sg) throws ServletException { 022 super.init(sg); 023 // do not get engine here, because then it is possible that the engine is initilized with this values 024 } 025 /** 026 * @see javax.servlet.http.HttpServlet#service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) 027 */ 028 protected void service(HttpServletRequest req, HttpServletResponse rsp) throws ServletException, IOException { 029 if(engine==null) 030 engine=CFMLEngineFactory.getInstance(getServletConfig(),this); 031 engine.serviceAMF(this,req,rsp); 032 } 033 }