在游戏框架中重定向

Redirect in play Framework

我在 java 中使用 play 2,我想做这样的事情: return 好的("message") ;在用户看到消息后(2 秒后),他将被重定向到“/home”

用HTML或JavaScript做,Play framework用它没有任何作用

<meta http-equiv="refresh" content="2; url=http://example.com/">

<script>
    setTimeout(function(){
         window.location.href = 'http://example.com/'
    },2000);
</script>