I add these code in the Boot class, but it doesn't work.

  How can write the correct code to parse the url ?

#########
object ParamsExtractor {
  def unapply(pp: ParsePath): Option[(String)] = {
Log.info("wholePath: " + pp.wholePath)
    val path = List("test")
    val result:Box[(String)] = if (pp.wholePath.startsWith(path) &&
pp.wholePath.length == (path.length + 2)) {
      val res = Full(("test2"))
Log.info("Decoded URL: %s=%s".format(pp, res))
                        res
    } else None
Log.info("result: " + result)
    result
  }
}

class Boot {
  def boot {
    ...
    LiftRules.statelessRewrite.prepend {
     case RewriteRequest(ParamsExtractor(param) , _, _) =>
       RewriteResponse(List("test"), Map("param" -> param))
    }
    ...
  }
}
#########

  Thanks!~~

Cheers,
  Neil

-- 
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.

Reply via email to