[coldbox 3.8.1] works with coldfusion10 but not with railo 4.1

Hi guys,

everything is in the title …

i’ve started a new project with the advance template with railo (i wanted to try)

well the first page of the template works when i call : http://127.0.0.1:8888/agenda/index.cfm

when i call http://127.0.0.1:8888/agenda/index.cfm/Main/index i have this

Problem accessing /agenda/index.cfm/Main. Reason: Not Found

i copy the code into coldfusion 10 www and guess what it works
http://127.0.0.1:8500/agenda/index.cfm/Main/index

on both server the coldbox directory is in the webroot

there is only one difference in coldfusion the version of coldbox is 3.7 and 3.8.1 in railo. Is there any conflic known between railo and coldbox ?

coldbox Coldbox seek 3.8.1
Java Version

1.7.0_45

Railo Server

F:\Railo\lib\ext\railo-server\context

Railo Version

4.1.2.005

Servlet Container

jetty/8.1.12.v20130726

thank you for your help,
Pierre

PS: sorry for my bad english

Chances are you’re running into servlet mappings issues with Tomcat or whatever servlet container you’re using. In Adobe CF, they use the .cfm/ pattern which will match any file in any subdirectory as long as it ends in .cfm. On a default Railo install on Tomcat for instance, the pattern is .cfm and /index.cfm/ (only one wildcard allowed) which won’t match a subdirectory AND extra SES stuff.

To test this, hit your app with a query string instead of an SES URL. Ex: www.yoursite/agenda/index.cfm?event=Main. If that works, then we have identified your issue.

To be clear, this has nothing to do with Railo, and everything to do with how the servlet container matches URL’s to servlet mappings. The fix is to edit your web.xml and add additional mappings for any subdirectories you have a ColdBox app in. Here’s what you would need to add to your web.xml

GlobalCFMLServlet /agenda/index.cfm/*

Of course, another option is simply to remove the “agenda” folder and put the app in the web root, but they may not work for you.

If this isn’t your issue, please paste in the exact error message, or provide more information.

Thanks!

~Brad

ColdBox Platform Evangelist
Ortus Solutions, Corp

E-mail: brad@coldbox.org
ColdBox Platform: http://www.coldbox.org
Blog: http://www.codersrevolution.com

hello,
thanks for your help butit’s not working.

i’ve tried with ?event=Main and it works so I modified the webdefault.xml located at Railo\etc.
I added the the servlet-mapping saved and restarted the server … the problem was still there so i took the url-pattern and place it inside this

CFMLServlet
/agenda/index.cfm/*

but nothing change.

after 3/4 restart of the railo server it start again and works by adding the url-pattern into the CFMLServlet.

thank you for your help :wink:

best regards,

If it works with a query string, then we’re on the right track. We just need to make sure you’re putting the correct config in the correct place of the correct file.

For instance, I think servlet mappings are processed in the order they are declared. Also, I copied mine from Tomcat, but if you’re using Resin/Jetty, etc the name of the servlet might be different.

Please provide some additional information on your setup. Also, it might be handy if you provide the contents of your web.xml in a Gist for us to see.

after 3/4 restart of the railo server it start again and works by adding the url-pattern into the CFMLServlet.

I’m not sure I followed that sentence. When you say it “works” do you mean your problem has been resolved, or you are still experiencing it?

Thanks!

~Brad

ColdBox Platform Evangelist
Ortus Solutions, Corp

E-mail: brad@coldbox.org
ColdBox Platform: http://www.coldbox.org
Blog: http://www.codersrevolution.com

I tried to translate a french expression :wink:

it works mean the problem is gone and everything is ok.
3/4 => 3 or 4 times

i attatched the web.xml
I use railo express (jetty inside).

If you need more info on my config i’ll be glad to help you.

Thank you
Pierre

webdefault.xml (28.6 KB)

Ah, no worries then. If you’ve got it working then that’s good.

I think I actually heard someone say recently that Resin does support the double wildcard in servlet mappings. I also noticed this comment in there:

Did you add that, or was it there to begin with? I would be interested to see if removing yours and uncommenting the .cfm/ pattern worked.

Thanks!

~Brad

ColdBox Platform Evangelist
Ortus Solutions, Corp

E-mail: brad@coldbox.org
ColdBox Platform: http://www.coldbox.org
Blog: http://www.codersrevolution.com

it was like this.
i’ve tried different possibility and none of them works.