Application.cfc issue on IIS

I’m having an issue with where I should place my application.cfc

Folder Structure is this

Project/Application.cfc
Project/public/
Project/public/assets
Project/services
Project/views
Project/mode

The only thing that IIS points at is the public folder,
This type of layout works fine on cf9 and above.

I can get it to work on Lucee if i add in an application.cfc under public
but then Adobe seems to have issues with the which one it decides to hit,
since it sees that components under the services folder has an
application.cfc directly above its folder.

Is there a web context path I should be modifying in one of the configs to
get it to work the same as Adobe?

Hi Josh

There are settings for how Lucee looks for Application.cfc in the
admin (under Settings > Request) but I don’t think it can go beyond
the root you’ve defined for the host in
[lucee-install]\tomcat\conf\server.xml

Cheers
Julian.On 10 January 2017 at 21:23, Josh Knutson <@Josh_Knutson> wrote:

I’m having an issue with where I should place my application.cfc

Folder Structure is this

Project/Application.cfc
Project/public/
Project/public/assets
Project/services
Project/views
Project/mode

The only thing that IIS points at is the public folder,
This type of layout works fine on cf9 and above.

I can get it to work on Lucee if i add in an application.cfc under public
but then Adobe seems to have issues with the which one it decides to hit,
since it sees that components under the services folder has an
application.cfc directly above its folder.

Is there a web context path I should be modifying in one of the configs to
get it to work the same as Adobe?

Inside of the server.xml I don’t see my site being defined, I do find it
under the tomcat\conf\Catalina\w3svc1
ROOT.XML

Which contains

<?xml version='1.0' encoding='utf-8'?> WEB-INF/web.xml

Should I copy this to the server.xml or try to modify it in that root.xml?

If I update it to be

public/WEB-INF/web.xml

Then it no longer initializes the application.cfcOn Wednesday, January 11, 2017 at 9:49:24 AM UTC-6, Julian Halliwell wrote:

Hi Josh

There are settings for how Lucee looks for Application.cfc in the
admin (under Settings > Request) but I don’t think it can go beyond
the root you’ve defined for the host in
[lucee-install]\tomcat\conf\server.xml

Cheers
Julian.

On 10 January 2017 at 21:23, Josh Knutson <josh.k...@gmail.com <javascript:>> wrote:

I’m having an issue with where I should place my application.cfc

Folder Structure is this

Project/Application.cfc
Project/public/
Project/public/assets
Project/services
Project/views
Project/mode

The only thing that IIS points at is the public folder,
This type of layout works fine on cf9 and above.

I can get it to work on Lucee if i add in an application.cfc under
public
but then Adobe seems to have issues with the which one it decides to
hit,
since it sees that components under the services folder has an
application.cfc directly above its folder.

Is there a web context path I should be modifying in one of the configs
to
get it to work the same as Adobe?

Nope, Application.lucee doesn’t seem to get picked up.On Wednesday, January 11, 2017 at 1:56:37 PM UTC-6, Josh Knutson wrote:

Thought of a work around, just don’t know how to best manage it. So I’ll
do some more research

What if instead of the Application.cfc, I have a Application.lucee file,
thought would allow it to work on both Adobe and Lucee severs if my
understanding is correct, and then I just have to update my methods to be
<: instead of the <cf.
Let me know if this would be the wrong path.

On Wednesday, January 11, 2017 at 12:52:25 PM UTC-6, Josh Knutson wrote:

Inside of the server.xml I don’t see my site being defined, I do find it
under the tomcat\conf\Catalina\w3svc1
ROOT.XML

Which contains

<?xml version='1.0' encoding='utf-8'?> WEB-INF/web.xml

Should I copy this to the server.xml or try to modify it in that root.xml?

If I update it to be

public/WEB-INF/web.xml

Then it no longer initializes the application.cfc

On Wednesday, January 11, 2017 at 9:49:24 AM UTC-6, Julian Halliwell wrote:

Hi Josh

There are settings for how Lucee looks for Application.cfc in the
admin (under Settings > Request) but I don’t think it can go beyond
the root you’ve defined for the host in
[lucee-install]\tomcat\conf\server.xml

Cheers
Julian.

On 10 January 2017 at 21:23, Josh Knutson josh.k...@gmail.com wrote:

I’m having an issue with where I should place my application.cfc

Folder Structure is this

Project/Application.cfc
Project/public/
Project/public/assets
Project/services
Project/views
Project/mode

The only thing that IIS points at is the public folder,
This type of layout works fine on cf9 and above.

I can get it to work on Lucee if i add in an application.cfc under
public
but then Adobe seems to have issues with the which one it decides to
hit,
since it sees that components under the services folder has an
application.cfc directly above its folder.

Is there a web context path I should be modifying in one of the
configs to
get it to work the same as Adobe?

Hi Josh,

I have run into this in the past. It is my understanding that Railo / Lucee
will not search down beyond your ‘public’ folder for the application.cfc,
but ACF will.

We ended up moving the application.cfc into the web root - the ‘public’
folder in your case. You can still reference your services, views and mode
folders by creating a mapping to them within the application.cfc. For
example:

<cfset THIS.mappings[“/services”] =
getDirectoryFromPath(getCurrentTemplatePath()) & "…\services">

Hope this helps.

All the best,

MartinOn Wednesday, 11 January 2017 14:37:56 UTC, Josh Knutson wrote:

I’m having an issue with where I should place my application.cfc

Folder Structure is this

Project/Application.cfc
Project/public/
Project/public/assets
Project/services
Project/views
Project/mode

The only thing that IIS points at is the public folder,
This type of layout works fine on cf9 and above.

I can get it to work on Lucee if i add in an application.cfc under public
but then Adobe seems to have issues with the which one it decides to hit,
since it sees that components under the services folder has an
application.cfc directly above its folder.

Is there a web context path I should be modifying in one of the configs to
get it to work the same as Adobe?

Josh, it might help if you could explain the context a bit more. Are
you saying the app needs to be run by both Lucee and ACF9?

Application.cfc is normally be located in the webroot. Why is it above
the webroot in your case?On 10 January 2017 at 21:23, Josh Knutson <@Josh_Knutson> wrote:

I’m having an issue with where I should place my application.cfc

Folder Structure is this

Project/Application.cfc
Project/public/
Project/public/assets
Project/services
Project/views
Project/mode

The only thing that IIS points at is the public folder,
This type of layout works fine on cf9 and above.

I can get it to work on Lucee if i add in an application.cfc under public
but then Adobe seems to have issues with the which one it decides to hit,
since it sees that components under the services folder has an
application.cfc directly above its folder.