Railo Express on Jetty + Mura + Tuckey Rewrite Filter

140 views
Skip to first unread message

Cameron Childress

unread,
Jul 24, 2012, 9:45:46 AM7/24/12
to ra...@googlegroups.com
I'm having a bit of a challenge getting Tuckey Rewriting to work w/Railo Express, or maybe it's a Mura problem (but I really think it's the rewrite filter at this point). I've posted on the Mura forums without luck and on the Tuckey Rewrite list without luck, now I am posting here.

I'm trying to rewrite basic URL strings in Mura to be translated from /index.cfm/page/ to /index.cfm?path=/page/. Seems easy right? YES, in fact it is easy. The URL rewriting works fine, Mura works fine on all navigation URLS. What's not working fine is FORMS. If I am posting any form variables, they don't seem to be making their way through the filter. I've verified this by dumping the #form# scope in onRequestStart() - it's empty (but the URL vars have been properly rewritten). 

If I post to a URL that doesn't trigger the rewrite filter (/?display=login), the form variables work. If I post to a URL that DOES trigger rewriting (/index.cfm/page/?display=login), no form variable are getting through.

The form is posting fine, the firleds are all being sent to the server properly (Charles tells me so), the variables just aren't showing up in Railo. I'm at a bit of a loss as to where to debug next.

I've uploaded my rules file here: 

https://dl.dropbox.com/u/2123009/tuckey.urlrewrite.xml 

My Railo / Jetty config file is here: 
https://dl.dropbox.com/u/2123009/tuckey.webdefault.xml 

Does anyone see anything obviously wrong here? Perhaps there is another non-Tuckey solution I should pursue instead? Suggestions?

-Cameron

--
Cameron Childress
--
p:   678.637.5072
im: cameroncf

Andrew Penhorwood

unread,
Jul 25, 2012, 7:30:36 AM7/25/12
to ra...@googlegroups.com
There is a native Jetty rewrite class.  I was not able to get it to work a few years back but their documentation is much better now.  You might try that route.

Andrew Penhorwood

Andrew Penhorwood

unread,
Jul 25, 2012, 7:32:07 AM7/25/12
to ra...@googlegroups.com

AJ Mercer

unread,
Jul 25, 2012, 7:34:11 AM7/25/12
to ra...@googlegroups.com
if any one can get that working I would love to hear about it

On 25 July 2012 19:32, Andrew Penhorwood <and...@coldbits.com> wrote:
http://wiki.eclipse.org/Jetty/Feature/Rewrite_Handler




--

AJ Mercer
<webonix:net strength="Industrial" /> | <webonix:org community="Open" />
http://twitter.com/webonix

Cameron Childress

unread,
Jul 25, 2012, 7:53:31 AM7/25/12
to ra...@googlegroups.com
I looked at this but gave up after a few minutes of trying, then went right to the Tuckey filter. I may spend a moment or two looking at it again but honestly I've already wasted enough time chasing this that it may take less time for me just to reconfigure Railo on something that's not Jetty..

-Cameron


On Wed, Jul 25, 2012 at 7:32 AM, Andrew Penhorwood <and...@coldbits.com> wrote:
http://wiki.eclipse.org/Jetty/Feature/Rewrite_Handler




Denny

unread,
Jul 25, 2012, 7:43:15 PM7/25/12
to ra...@googlegroups.com
This rang a bell!

Try putting the following chunk of code in your onRequestStart or similar:

if(gethTTPRequestData().method eq "POST") {
if(NOT structKeyExists(form,"fieldnames")) {
var paramMap = getPageContext().getRequest().getParameterMap();
var paramMapKeys = structKeyList(paramMap);
form.fieldnames = paramMapKeys;
for(x =1; x lte listLen(paramMapKeys); x++) {
param = listGetAt(paramMapKeys,x);
form[param] = paramMap[param][1];
}
}
}

And see if that doesn't get you going.

:Denny

On 7/25/12 5:53 AM, Cameron Childress wrote:
> I looked at this but gave up after a few minutes of trying, then went right
> to the Tuckey filter. I may spend a moment or two looking at it again but
> honestly I've already wasted enough time chasing this that it may take less
> time for me just to reconfigure Railo on something that's not Jetty..
>
> -Cameron
>
> On Wed, Jul 25, 2012 at 7:32 AM, Andrew Penhorwood <and...@coldbits.com>wrote:
>
>> http://wiki.eclipse.org/Jetty/Feature/Rewrite_Handler
>>
>>
>
>


--
Railo Technologies: getrailo.com Professional Open Source
Skype: valliantster (505)510.1336 de...@getrailo.com
GnuPG-FP: DDEB 16E1 EF43 DCFD 0AEE 5CD0 964B B7B0 1C22 CB62

Cameron Childress

unread,
Jul 26, 2012, 8:07:51 AM7/26/12
to ra...@googlegroups.com
Very much appreciated - I'm going to try this out later today.

Cameron Childress

unread,
Jul 27, 2012, 3:20:47 PM7/27/12
to ra...@googlegroups.com
I'm very happy to report that this completely fixed my problem. Thank you Denny!

So, this is a Jetty bug? Railo Bug? Filter bug? I'm happy that it works, but will send a bug report to whatever the relevant organization is who might use it the most. Feels like it's the filter's fault, but I am not entirely sure.

-Cameron

On Wed, Jul 25, 2012 at 7:43 PM, Denny <de...@getrailo.com> wrote:

AJ Mercer

unread,
Jul 29, 2012, 2:45:08 AM7/29/12
to ra...@googlegroups.com
This was a timely post - I just ran into this; and Denny's work-around did the trick (like there was any doubt ;-)

I am wondering too is this is a bug?
Maybe there are some tuckey flags that need to be set??

Denny

unread,
Jul 29, 2012, 4:06:55 AM7/29/12
to ra...@googlegroups.com
I looked into it back when I ran into that problem, and didn't see
anything obvious, but it felt like it was on the tuckey side to me too.

And now I can't remember if I tested it with the beta of tuckey. :-/

:Denny
>> facebook <http://www.facebook.com/cameroncf> | twitter<http://twitter.com/cameronc> |
>> google+ <https://profiles.google.com/u/0/117829379451708140985>
Reply all
Reply to author
Forward
0 new messages