[Helma-user] actions
Chris Zumbrunn
chris at mocha.ch
Fri Oct 6 15:08:55 CEST 2006
On Oct 6, 2006, at 14:34 , Jonathan Puckey wrote:
> Okay, as always with questions I found the answer after asking!
>
> "If the request path ends with "/", its last element will always be
> interpreted as path element (object), not as action."
> http://www.nabble.com/forum/ViewPost.jtp?
> post=733368&framed=y&skin=2589
>
> I'm afraid users will add a trailing slash when entering the url in
> their browser by hand.. So i'll have to look for another way..
>
>> Hello list!
>> I'm currently working on my first ever Helma project, and I'm really
>> enjoying the Helma way of doing things..
>>
>> I have a small question:
>> Is it possible to make actions work with a trailing slash?
>>
>> http://localhost/program/current
>> calls current_action()
>>
>> but http://localhost/program/current/ results in an 'object not
>> found' error..
>>
>> Any tips are much appreciated!
Hi Jonathan,
You could write an error_action that checks whether the req.path ends
with a slash and res.redirect to that url with the slash stripped off.
Chris
More information about the Helma-user
mailing list