Chrisi wrote:
Quoting Quintin:
> One way to do it is mark all your navigation for redirect .....
That's possible. But you still have two major drawbacks:
- Your request-scope bean-data get lost if you use the redirect navigation
- You still can't bookmark and crawl all those pages, because
parameters are not shown in the url and the first JSF request contains
always "empty data"
Indeed - but if there are parameters, that's normally because they are
things that a user has chosen. Spiders do not choose things from forms.
In general, you do not want spiders to index pages which are built
dynamically from choices made by a user (although there are exceptions).
Quoting Francesco:
.....We obtained
this result mainly by using outputLinks instead of commandLinks for
passing parameters to pages.
Ok, this seems to work. ;) But then, what is the advantage of using JSF
when
using outputLinks? You are leaving the typicall JSF life-cycle and
therefore the nice JSF features. It's comparable to use the good old
MVC style...
One approach is to use outputLinks (or just plain HTML) to reach pages
which you want indexed, and commandLinks where you want JSFy goodness.
Mix and match! After all, many apps will have some pages which are
fairly static and need to be indexable (eg product pages) and some
which are fully dynamic (eg pages for placing an order).
That solves the crawling problem but not bookmarking. Users will
bookmark any JSF page, expecting this to work in the normal way, only
of course it doesn't if you've just posted a form because then the
browser has the URL for the old page. There are (at least) two
approaches to this:
1) disallow bookmarking by using a filter to catch direct accesses
to JSF pages without a session (as when a user jumps into the middle
of the app from a bookmark); the filter can redirect them to a "start
here" page.
2) use a redirect for pages that you want to be bookmarkable. Again,
some pages should be bookmarkable (products) and some not (ordering).
Jon.
--
.....................................................................
Dr Jonathan Harley .
. Email: [EMAIL PROTECTED]
Zac Parkplatz Ltd . Office Telephone: 024 7633 1375
www.parkplatz.net . Mobile: 079 4116 0423