2012-10-16 162 views
1

没有数据,这是我定义的路由:此GET requset
GET /user/:id controllers.Users.show(id: Long)玩!框架:收到

这是处理程序(在Users类):

public static Result show(long id) { 
     return ok("hello " + id); 
    } 

我得到这个错误:

No data received Unable to load the webpage because the server sent no data. Here are some suggestions: Reload this webpage later. Error 324 (net::ERR_EMPTY_RESPONSE): The server closed the connection without sending any data.

这很奇怪,因为它是唯一一个有这个问题的页面,一切似乎都很正常。
那么为什么会发生?

回答

3

使用Longid的类型(而不是long):

public static Result show(Long id) { 
    return ok("hello " + id); 
} 
+0

亲爱的耶稣......我怎么能错过?谢谢 – socksocket