URL rewriting happens pretty early outside of rendering pipeline a S is not yet available. Hence the exception being thrown and not caught.
Br's, Marius On Apr 15, 2:53 pm, wapgui <torsten.schm...@wapgui.com> wrote: > Hi, > > I want to rewrite to an URL. The request is > likehttp://localhost:8080/d/120a96bdbf7 > and 120a96bdbf7 is a database key for > http://localhost:8080/apps/save/newsreader1239792999415.wgt. > So I added this to my Boot.scala > > LiftRules.rewrite.prepend { > case RewriteRequest(ParsePath("d" :: widget :: Nil, "", _,_), _, _) > => { > val rUrl = SmUrl.getSmUrl(widget).roboSplit("/") //get URL from > DB and split to List, this looks fine > RewriteResponse(rUrl) > } > > } > > In between I found out that RewriteResponse is only working for Map > entries. Now I used S.redirectTo instead of RewriteResponse and > net.liftweb.http.ResponseShortcutException: Shortcut is thrown. Last > try was to use LiftRules.DispatchPf like in us.esme.model.UrlStore but > DispatchPf is not (longer?) a member of LiftRules. > What else can I do? > > Cheers > Torsten --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Lift" group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~----------~----~----~----~------~----~------~--~---