Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package conf;
 
public class Routes implements MangooRoutes {
    @Override
    public void routify() {
        Router.mapRequest(.).toUrl("/").onClassAndMethod(ApplicationController.class"index");
        Router.mapRequest(.).toUrl("/redirect").onClassAndMethod(ApplicationController.class"redirect");
        Router.mapRequest(.).toUrl("/text").onClassAndMethod(ApplicationController.class"text");
        Router.mapRequest(.).toUrl("/forbidden").onClassAndMethod(ApplicationController.class"forbidden");
        Router.mapRequest(.).toUrl("/badrequest").onClassAndMethod(ApplicationController.class"badrequest");
        Router.mapRequest(.).toUrl("/unauthorized").onClassAndMethod(ApplicationController.class"unauthorized");
        Router.mapRequest(.).toUrl("/binary").onClassAndMethod(ApplicationController.class"binary");
        Router.mapRequest(.).toUrl("/header").onClassAndMethod(ApplicationController.class"header");
        Router.mapRequest(.).toUrl("/form").onClassAndMethod(FormController.class"form");
        Router.mapRequest(.).toUrl("/render").onClassAndMethod(JsonController.class"render");
        Router.mapRequest(.).toUrl("/parse").onClassAndMethod(JsonController.class"parse");
        Router.mapRequest(.).toUrl("/authenticityform").onClassAndMethod(AuthenticityController.class"form");
        Router.mapRequest(.).toUrl("/authenticitytoken").onClassAndMethod(AuthenticityController.class"token");
        Router.mapRequest(.).toUrl("/valid").onClassAndMethod(AuthenticityController.class"valid");
        Router.mapRequest(.).toUrl("/invalid").onClassAndMethod(AuthenticityController.class"invalid");
        Router.mapRequest(.).toUrl("/string/{foo}").onClassAndMethod(ParameterController.class"stringParam");
        Router.mapRequest(.).toUrl("/double/{foo}").onClassAndMethod(ParameterController.class"doubleParam");
        Router.mapRequest(.).toUrl("/int/{foo}").onClassAndMethod(ParameterController.class"intParam");
        Router.mapRequest(.).toUrl("/float/{foo}").onClassAndMethod(ParameterController.class"floatParam");
        Router.mapRequest(.).toUrl("/multiple/{foo}/{bar}").onClassAndMethod(ParameterController.class"multipleParam");
        Router.mapRequest(.).toUrl("/path").onClassAndMethod(ParameterController.class"pathParam");
        Router.mapRequest(.).toUrl("/session").onClassAndMethod(SessionController.class"session");
        Router.mapRequest(.).toUrl("/authenticationrequired").onClassAndMethod(AuthenticationController.class"notauthenticated");
        Router.mapRequest(.).toUrl("/login").onClassAndMethod(AuthenticationController.class"login");
        Router.mapRequest(.).toUrl("/logout").onClassAndMethod(AuthenticationController.class"logout");
        Router.mapRequest(.).toUrl("/flash").onClassAndMethod(FlashController.class"flash");
        Router.mapRequest(.).toUrl("/flashed").onClassAndMethod(FlashController.class"flashed");
        Router.mapRequest(.).toUrl("/translation").onClassAndMethod(I18nController.class"translation");
        Router.mapRequest(.).toUrl("/filter").onClassAndMethod(FilterController.class"filter");
        
        Router.mapRequest(.).toUrl("/validateform").onClassAndMethod(FormController.class"validateform");
        Router.mapWebSocket().toUrl("/websocket").onClass(WebSocketController.class);
        Router.mapResourceFile().toUrl("/robots.txt");
        Router.mapResourcePath().toUrl("/assets/");
    }
New to GrepCode? Check out our FAQ X