Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Scala Play framework beginner - 'Action Not Found'

I've defined this entry in routes file :

GET     /proj/:value.id     controllers.MyController.Accessor(ident:Long)

To access this URL should I be able to use ? :

http://localhost:9000/proj/value.id=3

When I try this URL I receive

Action Not Found
For request 'GET /proj/value.id=3'

I think the format of my erequest is incorrect ?

like image 748
blue-sky Avatar asked Feb 01 '26 02:02

blue-sky


1 Answers

If ID is a path param, it should be:

GET     /proj/:id     controllers.MyController.Accessor(id: Long)

accessed as:

http://localhost:9000/proj/3

If it's a query param, it should be:

GET     /proj     controllers.MyController.Accessor(id: Option[Long])

accessed as:

http://localhost:9000/proj?id=3

like image 137
slouc Avatar answered Feb 02 '26 17:02

slouc



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!