Java web中的重定向使用的是HttpServletResponse.sendRdirect(String url)方法。
Play也可以重定向,但它的response()方法没有重定向功能,直接在Controller中使用它的redirect(String url)方法即可:
public class SomeAction extends Controller{
public static Result gohome(){
return redirect("/index");
}
}