Created
March 14, 2012 09:19
-
-
Save mguillermin/2035314 to your computer and use it in GitHub Desktop.
Play 2.0 Java Controller Sample
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Application extends Controller { | |
public static Result testText() { | |
return ok("Hello world !"); | |
} | |
public static Result testTemplate() { | |
return ok(index.render("Your new application is ready.")); | |
} | |
public static Result testNotFound() { | |
return notFound("Could not find this page !"); | |
} | |
public static Result testRedirect() { | |
return redirect(controllers.routes.Application.testText()); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment