I have a JSF 2.0 (and Richfaces 4.0) application and I'd like to do something that seems simple.
I have a landing page (/index.xhtml) that is the 'welcome page' that is comes up when someone types "www.xxx.com" with xxx as my domain.
- I want to have an alternate landing page that will be the target of an ad that we're running. The way I was going to approach this since I'm going to highly customize this content is just have a new page: www.xxx.com/intro.xhtml. So far so good. My index page index.xhtml (and its copy intro.xhtml) has a bunch of linked public pages: "how it works", "sign up", etc... pretty typical stuff.
- The problem is how to I preserve or track the fact that the targeted users entered my site via the intro.xhtml when the go to "how it works" and then go back to the home page?
The use case that will be a problem is:
- user comes in via the ad and they're at intro.xhtml with the customized content.
- They go to a shared home page ("how it works").
- then they click home (or the site icon) to go back to home. As of now they go back to the welcome page (index.xhtml) which will be confusing to them.
All I can think of is:
- I could make a 'deep copy' of all of my other public pages (e.g. how_it_works copied to how_it_works_intro) and then have the _intro page link back to the intro.xhtml page when someone selections home from that, but that seems really dumb.
- do some post processing of the request in a servlet filter (say set session variable when the user initially hits intro.xhtml) and use this fact to route them back to intro.xhtml when they click home. But this seems like a bad idea because I don't want to start a session until they login. It also gets away from keeping all of your page flow in the faces-config.xml which I've done so far for the entire app.