Package com.google.gwt.user.server.rpc

Examples of com.google.gwt.user.server.rpc.RemoteServiceServlet


  @Override
  protected void service(HttpServletRequest req, final HttpServletResponse resp) throws ServletException, IOException {
    if(req.getHeader("X-GWT-Module-Base") != null && req.getHeader("X-GWT-Permutation") != null) {
      String moduleId = req.getRequestURI().split("/")[2];
      RemoteServiceServlet servlet = SiteMain.rpcServlets.get(moduleId);
      if(servlet == null) {
        try {
          servlet = (RemoteServiceServlet) Class.forName(Module.MODULE_PACKAGE + "." + moduleId + ".server." + Character.toUpperCase(moduleId.charAt(0)) + moduleId.substring(1) + "ServiceImpl").newInstance();
        } catch (Exception ex) {
          Logger.get().log(Level.SEVERE, null, ex);
          resp.sendError(500);
          return;
        }
        servlet.init(this.getServletConfig());
        SiteMain.rpcServlets.put(moduleId, servlet);
      }
      servlet.service(req, resp);
    } else {
      super.service(req, resp);
    }
  }
View Full Code Here

TOP

Related Classes of com.google.gwt.user.server.rpc.RemoteServiceServlet

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.