Skip to content

Instantly share code, notes, and snippets.

@daiksy
Created February 20, 2012 01:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save daiksy/1866897 to your computer and use it in GitHub Desktop.
Save daiksy/1866897 to your computer and use it in GitHub Desktop.
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