Hi, I have problems with Lift and URL correspondence. I wrote a simple rewrite rule:
LiftRules.rewrite.append { case RewriteRequest( ParsePath(List("user", userID), _, _, _), _, _) => { println(userID) RewriteResponse(List("viewUser"), Map("userID" -> urlDecode(userID))) } }
So when I enter http: // localhost: 8080 / user / brian I expect the call to be made in the viewUser.html file that I placed in the webroot directory, The viewUser.html icon is very simple:
<lift:surround with="default" at="content"> <p>ViewUser</p> </lift:surround>
But instead of viewing viewUser, I get an error:
The requested URL / user / brian was not found on this server
Also, if I manually enter the viewUser URL: http: // localhost: 8080 / user / brian I get the same error.
I have no idea about this, I found a similar error that occurs through the SiteMap system.
I tried this with a clean archetype elevator project, adding viewUser.html and adding one piece of rewrite code.
source share