Domanda

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?

È stato utile?

Soluzione

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...
} 
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top