it seems that I have a problem with defining Long variables in routes. this is the line in the routes file:

GET   /topic/:id                    controllers.Topics.show(id: Long)

and this is the method to handle this route:

public static Result show(long id) {
   // handle request here...
} 

what I get is error 324:

Error 324 (net::ERR_EMPTY_RESPONSE): The server closed the connection without sending any data.

I think the problem is with the Long data type because with Int it works like a charm.
what is the tweak to make it work?

有帮助吗?

解决方案

You have to use the Long object instead of the long primary type in your action:

public static Result show(Long id) {
   // handle request here...
} 
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top