I’m encountering an issue with Lucee 6.2 where RESTful API handlers cannot access:
Application-scope variables defined in Application.cfc
Methods/functions declared in Application.cfc
Default datasource settings
I’m encountering an issue with Lucee 6.2 where RESTful API handlers cannot access:
Application-scope variables defined in Application.cfc
Methods/functions declared in Application.cfc
Default datasource settings
which each version of lucee and did it work previously with a previous version?
version lucee-express-6.2.1.122 not work,
work in lucee-express-6.0.3.1
I just updated the docs, please see
1- Moved Application.cfc to the root of my REST folder.
2- Accessed index.cfm first (located at the same level as Application.cfc) in the browser.
3- The front-end (Angular) works initially—processing 2-3 API calls successfully—but then loses the Application variables and datasource name.
could you create a PR with an example repo here?
Thanks @Zackster,
It’s working fine for me now after many tries.
The Application.cfc file must be at the same level as the CFC components.
/myrestapi/ (root - rest mapping)
├── index.cfm
└── /cfcs/ (subfolder)
----------├── Application.cfc
----------├── UserService.cfc
----------├── AuthService.cfc
----------└── … (other CFCs)
Note: it’s work without accessed index.cfm first in the browser.