SiteMap creation -> error on page forwarding

14 views
Skip to first unread message

Adrian M

unread,
May 31, 2016, 11:21:40 PM5/31/16
to Lift
I'm trying to create a sitemap and I have this code in Boot.scala
I have this code:

val purchase = Menu.i("Purchase") / "pay" >> LocGroup("authenticated") >> loggedIn

where

val loggedIn = If(() => User.loggedIn_?, () => RedirectResponse("/login"))

In the browser, when I user this URL localhost:8080/pay it forwards me to localhost:8080/login as expected BUT I get an error:
  "The Requested URL /login was not found on this server"

How can I get this page to display? I do have it in webapp/pay.html

Thanks
A

Antonio Salazar Cardozo

unread,
May 31, 2016, 11:35:08 PM5/31/16
to Lift
You'll need to add a `/login` page to your SiteMap (and the relevant HTML to your
webapp file). If you're using Lift's built-in login stuff, you'll have to add that to the
SiteMap.
Thanks,
Antonio

Adrian M

unread,
Jun 2, 2016, 10:25:24 AM6/2/16
to Lift
Thanks
I added it as hidden since I didn't want it to appear in the menu and it worked.

Antonio Salazar Cardozo

unread,
Jun 2, 2016, 11:06:44 AM6/2/16
to Lift
Sweet!
Reply all
Reply to author
Forward
0 new messages