The ReasonableServlet is the main entry point for execution when RSF is used in a plain HTTP Servlet environment. The complete code is shown below:

public class ReasonableServlet extends HttpServlet {
  private RSACBeanLocator rsacbeanlocator;
  public void init(ServletConfig config) {
    ServletContext sc = config.getServletContext();
    WebApplicationContext wac = WebApplicationContextUtils.getWebApplicationContext(sc);
    rsacbeanlocator = (RSACBeanLocator) wac.getBean("rsacBeanLocator");
  }
  
  protected void service(HttpServletRequest requst, HttpServletResponse response) {
    rsacbeanlocator.getBeanLocator().locateBean("rootHandlerBean");
  }
}

The ReasonableServlet is a prime example of request scope programming since its entire logic is encoded by the fetching of a single request-scope bean (the rootHandlerBean) in whose init-method the entire request is handled.

Add new attachment

Only authorized users are allowed to upload new attachments.
« This page (revision-) was last changed on 19-Jul-2006 09:36 by UnknownAuthor