/** * Add a servlet to the servlet registry. This servlet will be attached to the * specified URL pattern when the server is started up. * @param urlPattern the URL pattern for paths. Eg, '/foo', '/foo/*'. * @param servlet the servlet class to bind to the specified paths. * @return the {@link ServletHolder} that holds the servlet. */ public ServletHolder addServlet(String urlPattern, Class<? extends HttpServlet> servlet) { return addServlet(urlPattern, servlet, null); }
private static void initializeRobotAgents(ServerRpcProvider server) { server.addServlet(PasswordRobot.ROBOT_URI + "/*", PasswordRobot.class); server.addServlet(PasswordAdminRobot.ROBOT_URI + "/*", PasswordAdminRobot.class); server.addServlet(WelcomeRobot.ROBOT_URI + "/*", WelcomeRobot.class); server.addServlet(RegistrationRobot.ROBOT_URI + "/*", RegistrationRobot.class); }
public void addWebSocketServlets() { // Servlet where the websocket connection is served from. ServletHolder wsholder = addServlet("/socket", WaveWebSocketServlet.class); // TODO(zamfi): fix to let messages span frames. wsholder.setInitParameter("bufferSize", "" + BUFFER_SIZE); // Serve the static content and GWT web client with the default servlet // (acts like a standard file-based web server). addServlet("/static/*", DefaultServlet.class); addServlet("/webclient/*", DefaultServlet.class); }
private static void initializeServlets(ServerRpcProvider server, Config config) { server.addServlet("/gadget/gadgetlist", GadgetProviderServlet.class); server.addServlet(AttachmentServlet.ATTACHMENT_URL + "/*", AttachmentServlet.class); server.addServlet(AttachmentServlet.THUMBNAIL_URL + "/*", AttachmentServlet.class); server.addServlet(AttachmentInfoServlet.ATTACHMENTS_INFO_URL, AttachmentInfoServlet.class); server.addServlet(SessionManager.SIGN_IN_URL, AuthenticationServlet.class); server.addServlet("/auth/signout", SignOutServlet.class); server.addServlet("/auth/register", UserRegistrationServlet.class); server.addServlet("/locale/*", LocaleServlet.class); server.addServlet("/fetch/*", FetchServlet.class); server.addServlet("/search/*", SearchServlet.class); server.addServlet("/notification/*", NotificationServlet.class); server.addServlet("/robot/dataapi", DataApiServlet.class); server.addServlet(DataApiOAuthServlet.DATA_API_OAUTH_PATH + "/*", DataApiOAuthServlet.class); server.addServlet("/robot/dataapi/rpc", DataApiServlet.class); server.addServlet("/robot/register/*", RobotRegistrationServlet.class); server.addServlet("/robot/rpc", ActiveApiServlet.class); server.addServlet("/webclient/remote_logging", RemoteLoggingServiceImpl.class); server.addServlet("/profile/*", FetchProfilesServlet.class); server.addServlet("/iniavatars/*", InitialsAvatarsServlet.class); server.addServlet("/waveref/*", WaveRefServlet.class); server.addServlet("/", WaveClientServlet.class); if (enableProfiling) { server.addFilter("/*", TimingFilter.class);