CF Wheels URL issue on Tomcat + IIS

135 views
Skip to first unread message

Denis Agusevic

unread,
May 12, 2012, 5:45:39 PM5/12/12
to Railo
I am trying to set up a local testing environment for the CF Wheels
framework running on Win 7 x64, IIS 7.5 (with Rewrite module
installed) and the latest Railo 3.3.2.002 running on Tomcat 7 (with
the Boncode connector).

I've read carefully through all the available documentation and tried
every reasonable setting but I am still unable to hand over the
requests correctly to IIS =>>

http://cfwheels.me:8888/index.cfm/{controller}/{action} SO
FAR SO GOOD -- TOMCAT IS WORKING AS EXPECTED

http://cfwheels.me/index.cfm/{controller}/{action} IIS THROWS UP THE
WELCOME PAGE (using default 'HOME' route) INSTEAD OF THE REQUESTED
PAGE

http://cfwheels.me/{controller}/{action} SAME BEHAVIOUR AS ABOVE


I came across a very similar (and unresolved) issue posted <a
href="http://groups.google.com/group/railo/browse_thread/thread/
756959d0384d4e6e/976b1f0a9675acc0?
lnk=gst&q=wheels#976b1f0a9675acc0">here</a> but that was related to
the previous version of Railo using an older connector.
I wonder if anybody has come up with a solution since then?
BR/ Denis

Yaroslav Govorunov

unread,
May 14, 2012, 10:21:32 AM5/14/12
to Railo
Hello Denis.

May I suggest you to try Helicon Zoo solution instead. It includes
Railo installation for IIS which can be used as a hosting and
production solution as well.
Here is a product page: http://www.helicontech.com/zoo/

We don't currently have Railo specific article, but installation
process is very simple.
You will need to follow installation instructions of the Helicon Zoo
product itself. After you get Zoo tab in the Web Platform Installer
just go to Engines and install Railo from there.
Then create IIS web site or application and use the web.config file
from the usage page here: http://www.helicontech.com/zoo/usage/java-railo.htm
this will create new Railo application on IIS.

AJ Mercer

unread,
May 14, 2012, 6:36:37 PM5/14/12
to ra...@googlegroups.com
to get 
you need to update web.xml
see
<url-pattern>/index.cfm/*</url-pattern>
For
you need to add
<url-pattern>/rewrite.cfm/*</url-pattern>
Here are my notes for setting up friendly URLS with tuckey on tomcat

Please confirm that this worked for you and I will get the Railo wiki updated with a CFWheels config

Li, Da

unread,
May 14, 2012, 9:12:08 PM5/14/12
to ra...@googlegroups.com
I code in the same environment as yours.

In my experience there's also a need to set up Boncode to take over all the requests from IIS. Please refer to this post:

Denis Agusevic

unread,
May 15, 2012, 10:32:26 AM5/15/12
to Railo
Thank you ALL for your valuable advice:

@AJ Mercer
Sure, this was one of the very first things I tried.
But when I put the web.xml file into WEB-INF folder all I get is a
nice 404 error, let the URL rewriting alone.
Any idea what went wrong?


@Li, Da
Noted and changed the BonCode settings accordingly but as expected
this alone did not resolve the problem completely.


@Yaroslav
The Helicon Zoo solution is based on Mortbay Jetty AS, rather than my
current configuration. I would probably try it as the next option.

spills

unread,
May 16, 2012, 2:12:23 PM5/16/12
to ra...@googlegroups.com
You may be running into the empty CGI.Path_Info issue I ran into with a similar setup as yours but with Mura. I was fortunate that Jordan was able to come up with IIS rewrite that worked out the issue. See the thread here https://groups.google.com/forum/?fromgroups#!topic/railo/rlFKOeMYWdw and you might be able to modify the rewrites for your purpose.
Message has been deleted

Denis Agusevic

unread,
May 19, 2012, 5:48:12 PM5/19/12
to Railo
Indeed, it seems the request handling here is impaired by the empty
CGI.Path_Info.
However, the cgi.xajp-path-info variable was not defined in cgi scope
and honestly I was not able to reproduce the suggested rewrite rules
as they made little sense to me.
Thanks for your reply anyway.

BR/Denis
> > lnk=gst&q=wheels#976b1f0a9675acc0<http://groups.google.com/group/railo/browse_thread/thread/756959d0384...>">here</a>

stofke

unread,
May 20, 2012, 3:36:05 AM5/20/12
to Railo
If the cgi.path_info isn't populating you could try:
http://craigkaminsky.me/cfwheels-and-ses-urls

Add the following to events/onrequeststart.cfm:

if(structKeyExists(url,"$pathinfo")){
request.cgi.path_info = url.$pathinfo
}

Not sure if it would help in this case

Bilal

unread,
May 20, 2012, 9:36:46 AM5/20/12
to ra...@googlegroups.com
The CGI scope is an artificial scope in Adobe and Railo. Only a limited amount of actual http data points are exposed through it.

If you need to access anything that is not part of the fixed list you need to use GetHttpRequestData() function.

For example to get the xajp-path-info HTTP Header (on Windows with IIS):

GetHttpRequestData().headers["xajp-path-info"]

Hope this helps,
-Bilal



andreas

unread,
May 20, 2012, 2:52:08 PM5/20/12
to ra...@googlegroups.com

Great tip bilal. This is good to know for all iis and tomcat-ajp users. Thx

Reply all
Reply to author
Forward
0 new messages