Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

playframework modules and routes

I use Play! Framework 1.2.5

I have a module 'businessmodel'. Here in conf/routes:

GET / businessmodel.Admin.index

There I have controller:

package controllers.businessmodel;

import play.mvc.Controller;

public class Admin extends Controller { ...

and a view:

/view/businessmodel/Admin/index.html

In main application that depends on this module, in conf/routes I have:

GET /admin module:businessmodel

When go to myhost:9000/admin I have on the page the error:

Not found
GET /admin

Also, on the same error page I have list of defined routes:

GET       /                                                 Application.index
GET       /admin/                                           businessmodel.Admin.index
GET       /favicon.ico                                      404
GET       /public/                                          staticDir:public
*         /{controller}/{action}                            {controller}.{action}                      {controller}.{action}

--

But if change the module's routes to this line (adding '?'):

GET     /?                      businessmodel.Admin.index

then we have different error:

@6cpelo7bh Internal Server Error (500) for request GET /admin

Action not found Action businessmodel.Admin.index could not be found. Error raised is MODULE$

Do I miss something to define?

like image 377
ses Avatar asked Aug 12 '26 01:08

ses


1 Answers

I found the solution.. This strange error still appears:

Action not found Action businessmodel.Admin.index could not be found. Error raised is MODULE$

Here is the issue:

https://play.lighthouseapp.com/projects/57987/tickets/414-better-error-message-when-action-method-is-missing-parameter

(I've add my final comment into this issue.)

If one forgets static in controller's method. I've spent one hour on this..

like image 198
ses Avatar answered Aug 13 '26 16:08

ses



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!