Created
February 20, 2012 01:04
-
-
Save daiksy/1866897 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
package controllers; | |
import play.*; | |
import play.mvc.*; | |
import views.html.*; | |
public class Application extends Controller { | |
/** | |
* 宿題その1:ヘッダの指定 | |
*/ | |
public static Result index() { | |
response().setContentType("text/csv"); | |
response().setHeader("Cache-control", "no-cache"); | |
return ok(); | |
} | |
/** | |
* 宿題その2: リダイレクト | |
* Reverse routing | |
*/ | |
public static Result redirectTest() { | |
return redirect(routes.Application.index()); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment