url handling

2 views
Skip to first unread message

Oliver Lambert

unread,
Dec 19, 2008, 10:26:28 PM12/19/08
to liftweb
Hi

I notice lift sometimes lift rewrites the url a little
e.g. - http://localhost:9090/enter becomes http://localhost:9090/enter?fnVT32KHAJRTHI5RNQ2XBY=_

What are the rules for when this happens?
Is there anyway to write a lift application where it doesn't happen?

cheers
Oliver

Marius

unread,
Dec 20, 2008, 5:40:48 AM12/20/08
to Lift
Looks like a function will be executed when this request is submitted.

In what conditions are you seeing this? Are you calling S.redirectTo
and pass a function? ... or use RedirectWithState?

Br's,
Marius

On 20 Dec, 05:26, Oliver Lambert <ola...@gmail.com> wrote:
> Hi
>
> I notice lift sometimes lift rewrites the url a little
>     e.g. -  http://localhost:9090/enterbecomeshttp://localhost:9090/enter?fnVT32KHAJRTHI5RNQ2XBY=_

Tim Perrett

unread,
Dec 20, 2008, 6:40:01 AM12/20/08
to lif...@googlegroups.com
Oliver,

Lift will only create these types of URL when you pass params when
creating a link.

There is a very sophisticated rewriting engine in lift, so a better
question would be what do you want your URL to look like?

Thanks, Tim

Sent from my iPhone

Oliver Lambert

unread,
Dec 20, 2008, 7:31:01 AM12/20/08
to lif...@googlegroups.com
Im using a net.liftweb.http.S.redirectTo within a stateful snippet.

Oliver Lambert

unread,
Dec 20, 2008, 7:36:12 AM12/20/08
to lif...@googlegroups.com
Simple, I would like my url to be called without ?... tacked onto the
end.

Derek Chen-Becker

unread,
Dec 20, 2008, 10:36:21 AM12/20/08
to lif...@googlegroups.com
Are you sure you're using S.redirectTo? For one, that's not what you want if you want to keep using the same stateful snippet instance. Second, if you're not calling it explicitly (i.e. using just "redirectTo"), the "this" version of redirectTo on StatefulSnippet may be firing.

Derek

Marius

unread,
Dec 20, 2008, 1:31:04 PM12/20/08
to Lift
Yeah but there are 2 overloaded versions. Are you also pasing a
function to it?

On 20 Dec, 14:31, Oliver Lambert <ola...@gmail.com> wrote:
> Im using a net.liftweb.http.S.redirectTo within a stateful snippet.
>
> On 20/12/2008, at 9:40 PM, Marius wrote:
>
>
>
> > Looks like a function will be executed when this request is submitted.
>
> > In what conditions are you seeing this? Are you calling S.redirectTo
> > and pass a function? ... or use RedirectWithState?
>
> > Br's,
> > Marius
>
> > On 20 Dec, 05:26, Oliver Lambert <ola...@gmail.com> wrote:
> >> Hi
>
> >> I notice lift sometimes lift rewrites the url a little
> >>     e.g. -  http://localhost:9090/enterbecomeshttp://localhost:9090/enter?fnVT32K...

Oliver Lambert

unread,
Dec 20, 2008, 1:40:03 PM12/20/08
to lif...@googlegroups.com
It sounds like the this version is firing. What should I be using?

Oliver Lambert

unread,
Dec 20, 2008, 1:44:14 PM12/20/08
to lif...@googlegroups.com
No, but as Derek suggests, it sounds a bit like the stateful snippet
is doing it for me.

Marius

unread,
Dec 21, 2008, 1:35:42 PM12/21/08
to Lift
It really does ... In fact redirectTo from StatefulSnippet calls
S.redirectTo and passes a function which sets this current snippet on
S when redirect happens.

Br's,
Marius
Reply all
Reply to author
Forward
0 new messages