It's actually not good practice. Manage Beans are ideally simple JavaBeans and therefore shouldn't be aware of the framework - including whether they're running under
JSF or even in a web application at all.
You can break out of the box by chasing uphill from the FacesContext, but as I've mentioned in other posts on this forum, javabeans are best employed as injection targets, not as items that go out and grab info.
Ignoring ideology, however, there's another issue. JSF isn't directly tied to the URL. Once you start talking in a JSF conversation, an anchor point gets established, and it's the anchor point that's referenced in the URLS for JSF page actions, not an explicit command a la
Struts. So knowing the user's last submitted URL may not be a reliable indicator what what's going on or what
you should be doing.
Some people, when well-known sources tell them that fire will burn them, don't put their hands in the fire.
Some people, being skeptical, will put their hands in the fire, get burned, and learn not to put their hands in the fire.
And some people, believing that they know better than well-known sources, will claim it's a lie, put their hands in the fire, and continue to scream it's a lie even as their hands burn down to charred stumps.