On my mobile at the moment so can't paste a code example.
Hope that helps, Tim
This is a running example where you visit a page like
http://127.0.0.1:8080/browser-details/2.4.0.1090
And it uses the template browser-details and it passes the 2.4.0.10 9 0 to the template.
Let me know if you have any questions.
Sent from my cell
https://github.com/fmpwizard/comet_rest_example
Diego Medina
--
You received this message because you are subscribed to the Google Groups "Lift" group.
To post to this group, send email to lif...@googlegroups.com.
To unsubscribe from this group, send email to liftweb+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
> Let me clarify it this way (Bad English Speaker :) ),
> no context path is required any longer. I need to rewrite the url:
> *http://localhost:8080/Pages/edit/(postid)*using the following code:
>
> LiftRules.statelessRewrite.
> prepend(NamedPF("URL Rewrite") {
> case RewriteRequest(
> ParsePath("Pages" :: "edit" :: postid :: Nil, _, _,_), GetRequest,
> _) =>
> RewriteResponse(
> "Pages" :: "edit" :: postid :: Nil, Map("postid" -> postid)
> )
> })
>
> When the URL *http://localhost:8080/Pages/edit/10 is *visited, I wanna get
> the postid in my snippet.
> but now I got a NOT_FOUND error.
> I guess Lift trying to locate a 10.html file which means the URL rewrite
> doesn't work.
Have a look here: http://simply.liftweb.net/index-3.2.html (Parameters)
Also, for a custom Loc you can look here:
/Jeppe
Why are you using statelessRewrite?
http://www.assembla.com/wiki/show/liftweb/Posting_example_code
and I'll work something out.
Regards
Diego
> --
> You received this message because you are subscribed to the Google Groups
> "Lift" group.
> To post to this group, send email to lif...@googlegroups.com.
> To unsubscribe from this group, send email to
> liftweb+u...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/liftweb?hl=en.
>
--
Diego Medina
Web Developer
http://www.fmpwizard.com
You need to use rewriting for this. Lift has good support for this type of thing, pretty sure there are examples on the wiki. Additionally, there are decent examples in Lift in Action.
On my mobile at the moment so can't paste a code example.
Hope that helps, Tim
--
You received this message because you are subscribed to the Google Groups "Lift" group.
To post to this group, send email to lif...@googlegroups.com.
To unsubscribe from this group, send email to liftweb+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
"Shark.Z" <evo...@gmail.com> writes:Have a look here: http://simply.liftweb.net/index-3.2.html (Parameters)
> Let me clarify it this way (Bad English Speaker :) ),
> no context path is required any longer. I need to rewrite the url:
> *http://localhost:8080/Pages/edit/(postid)*using the following code:
>
> LiftRules.statelessRewrite.
> prepend(NamedPF("URL Rewrite") {
> case RewriteRequest(
> ParsePath("Pages" :: "edit" :: postid :: Nil, _, _,_), GetRequest,
> _) =>
> RewriteResponse(
> "Pages" :: "edit" :: postid :: Nil, Map("postid" -> postid)
> )
> })
>
> When the URL *http://localhost:8080/Pages/edit/10 is *visited, I wanna get
> the postid in my snippet.
> but now I got a NOT_FOUND error.
> I guess Lift trying to locate a 10.html file which means the URL rewrite
> doesn't work.
Also, for a custom Loc you can look here:
https://github.com/lift/examples/blob/master/combo/example/src/main/scala/net/liftweb/example/lib/WikiStuff.scala
/Jeppe
--
You received this message because you are subscribed to the Google Groups "Lift" group.
To post to this group, send email to lif...@googlegroups.com.
To unsubscribe from this group, send email to liftweb+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.