What's the best way to redirect to a given Seam page, for example the main screen of your application, when a user accesses a page that doesn't exist (e.g. due to a misspelling), and to include a custom message in the page to which the user has been redirected?
Two options I can think of, and I don't know if either would work for sure:
- Add a servlet-mapping url-pattern of /* to web.xml - (but how would you get a custom message inserted into that page?)
- Change the url-pattern for the Seam servlet to be /* instead of *.seam, then in pages.xml add another navigation element to page view-id="*" - would this work? (I already have navigation elements under that default page element with rule elements.) In this case also, how would I specify a message to be inserted into the page?