Use urlrewrite that comes with seam
Thanks for the answer. That won't really be less work. I was hoping that I have overlooked something in the pages.xml syntax.
Don't you think that's a common request - just render or redirect somewhere else?
More importantly I am not sure if the urlrewrite approach will work: How can I rewrite outbound occurences of
/baustelle.xhtmlto different view-ids (if I use my temporary
/baustelle.xhtmlat several pages)?
I can live with the slightly strange construct of calling a dummy page action just to get a navigation hook, it's just something that doesn't feel right.
Your nullAction could return to the new view-id if you preferred. That reduces the XML Or, if you just always want to trigger the new view, just make the view-id the action:
<page view-id="/home.xhtml" action="/baustelle.xhtml" />
Well, rendering and redirecting is a common request, but for pages that don't exist yet? Maybe not, whatever floats your boat. I would just use my handy 404 page, but it looks like Norman's solution is probably what you are looking for.
But that will navigate to the new view, right?
I'd like the URL to stay like it is, so that for example the selenium test that checks if a user is redirected to the home page after successful login can already be written and runs fine.
virtualviews really are quite common. They could also be old pages where I'd like the URL to stay valid.
Another example is an action
invalidate-session.xhtmlthat I use for testing proper handling of session time-outs: I invoke the URL in one browser tab to kill the session, then in another browser tab try to use the session. (Else I would need to change my web.xml for testing to have a session timeout of 1 minute, then wait at least that long until the container really removes the session. Also my Selenium tests need this hook.)