You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Chrisi <ne...@googlemail.com> on 2006/05/13 19:43:45 UTC

Bookmarking and Crawling of JSF

Hello,

I know this one seems to be an FAQ, but I didn't find a satisfying answer,
yet. Sorry!

The inability to bookmark and be properly indexed by search engines seems to
be the biggest downsides of JSF.
Applications which require to be found from Google and Co., can't be
implemented using JSF / MyFaces.

Or did I miss something?
Is there a way in myfaces to generate unique URL by using a GET request?

Thanks and Greetings
Chrisi

Re: Bookmarking and Crawling of JSF

Posted by Chrisi <ne...@googlemail.com>.
On 5/15/06, Mario Ivankovits <ma...@ops.co.at> wrote:
> We already started a jsf tag which should allow you to deal with get
> requests then.
> In combination with an navigation handler and <redirect navigation rules
> it should allow you to have bookmarkable pages then.
>
> Just, due to the conferences (javaOne, jax, apacheCon) we are somehow
> little of time.

That's sounds great. :)
Please let me know when a first version is available. I love to test it......

Have fun on javaOne, jax, apacheCon and so on.....

Thanks
Chrisi

Re: Bookmarking and Crawling of JSF

Posted by Cosma Colanicchia <co...@gmail.com>.
Hi Mario,

I agree with your point, a web application can't (and doesn't want to, IMO)
provide bookmark facility for each of its states. From the user prospective,
it would be much more clear if developers could tell the browser to disable
the "add bookmark" function where it has no meaning. But it's only a hope :)

Ciao
Cosma



2006/5/15, Mario Ivankovits <ma...@ops.co.at>:
>
> Hi!
> > I'm not yet involved in the "bookmark and back button" issues, but I
> > hope that, for the time I will, you'll have already found a brillant
> > solution :)
> There were many discussions about it (the bookmark thema), often some
> philosophic.
> I don't know how brilliant our solution will be, well, I am not sure if
> there exists a "brilliant solution" in the context of JSF as you cant
> deal with the huge state your application will hold in simple GET
> parameters.
>
> At least it will be a working solution, how good will tell the time ;-)
>
> Ciao,
> Mario
>
>

Re: Bookmarking and Crawling of JSF

Posted by Mario Ivankovits <ma...@ops.co.at>.
Hi!
> I'm not yet involved in the "bookmark and back button" issues, but I
> hope that, for the time I will, you'll have already found a brillant
> solution :)
There were many discussions about it (the bookmark thema), often some
philosophic.
I don't know how brilliant our solution will be, well, I am not sure if
there exists a "brilliant solution" in the context of JSF as you cant
deal with the huge state your application will hold in simple GET
parameters.

At least it will be a working solution, how good will tell the time ;-)

Ciao,
Mario


Re: Bookmarking and Crawling of JSF

Posted by Cosma Colanicchia <co...@gmail.com>.
I'm not yet involved in the "bookmark and back button" issues, but I hope
that, for the time I will, you'll have already found a brillant solution :)



2006/5/15, Mario Ivankovits <ma...@ops.co.at>:
>
> Hi!
> > A sort of "allowbookmarks" standard meta tag would be great :)
> We already started a jsf tag which should allow you to deal with get
> requests then.
> In combination with an navigation handler and <redirect navigation rules
> it should allow you to have bookmarkable pages then.
>
> Just, due to the conferences (javaOne, jax, apacheCon) we are somehow
> little of time.
>
> Ciao,
> Mario
>
>

Re: Bookmarking and Crawling of JSF

Posted by Mario Ivankovits <ma...@ops.co.at>.
Hi!
> A sort of "allowbookmarks" standard meta tag would be great :)
We already started a jsf tag which should allow you to deal with get
requests then.
In combination with an navigation handler and <redirect navigation rules
it should allow you to have bookmarkable pages then.

Just, due to the conferences (javaOne, jax, apacheCon) we are somehow
little of time.

Ciao,
Mario


Re: Bookmarking and Crawling of JSF

Posted by Cosma Colanicchia <co...@gmail.com>.
A sort of "allowbookmarks" standard meta tag would be great :)

Cosma

2006/5/15, Chrisi <ne...@googlemail.com>:
>
> On 5/14/06, Andrew Robinson <an...@gmail.com> wrote:
> > Just to add to your list
> > 3) Create a "bookmark this page" link as part of each page (create a
> > custom control, or just use a facelets template) and
>
> Sure that's a workaround. But
> - this "method of bookmarking" isn't widely accepted by the user
> - and (important) doesn't really help searchengine's like google
>
> In my opinion this issue is a bug by design. It's a pety that
> the architects of JSF doesn't consider the issue of being "conform
> with standard web navigation".
>
> Would be cool if the myfaces people could implement a solution for this
> design-bug. :)
> It seems to be the problem of the postback mechanism to the same form
> (via POST) and the internal forward to another page.
> Wouldn't it be possible to switch to GET requests (when using server
> state saving)? The URLs of forms/links should be unique for a
> standard-outcome in the navigation rule. Other outcomes could be
> redirect.
> The browser would always have a valuable URL ......
>
>
> Greetings
> Chrisi
>

Re: Bookmarking and Crawling of JSF

Posted by Chrisi <ne...@googlemail.com>.
On 5/14/06, Andrew Robinson <an...@gmail.com> wrote:
> Just to add to your list
> 3) Create a "bookmark this page" link as part of each page (create a
> custom control, or just use a facelets template) and

Sure that's a workaround. But
- this "method of bookmarking" isn't widely accepted by the user
- and (important) doesn't really help searchengine's like google

In my opinion this issue is a bug by design. It's a pety that
the architects of JSF doesn't consider the issue of being "conform
with standard web navigation".

Would be cool if the myfaces people could implement a solution for this
design-bug. :)
It seems to be the problem of the postback mechanism to the same form
(via POST) and the internal forward to another page.
Wouldn't it be possible to switch to GET requests (when using server
state saving)? The URLs of forms/links should be unique for a
standard-outcome in the navigation rule. Other outcomes could be
redirect.
The browser would always have a valuable URL ......


Greetings
Chrisi

Re: Bookmarking and Crawling of JSF

Posted by Jon <jo...@serf.org>.
Andrew Robinson wrote:
> Just to add to your list
> 3) Create a "bookmark this page" link as part of each page (create a
> custom control, or just use a facelets template) and have that link
> represent all the query string parameters needed to re-build your
> backing beans. Then, using managed properties or, if you use Seam, use
> the @RequestParameter attribute, or just check the request parameters,
> re-load the data. You could make a special servlet to auto-load data
> as you see fit for these URLs as well.
> 
> There are many ways to approach this one, all with pros and cons.
> Perhaps someone can build a reusable one at some point.

A con shared by any variation on this scheme is the users - they
are used to using a browser control not an on-page control and
some users stick to what they know like glue. Also, IE users
don't even know what "bookmarks" are, because they have
"favourites" instead.

J.

> On 5/14/06, Jonathan Harley <jo...@parkplatz.net> wrote:
> 
>> 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: jon@parkplatz.net
>>             Zac Parkplatz Ltd   .   Office Telephone: 024 7633 1375
>>             www.parkplatz.net   .   Mobile: 079 4116 0423
>>


-- 
____________________ ____ ____________________________________________________
  With metta from:    \ _/__   In the north sky time flies fast to the morning
   jon@serf.org        \X  /  The cold of the dawn it meant nothing to us, you
  http://serf.org/jon/   \/  were keeping your best situation an answer to yes

Re: Bookmarking and Crawling of JSF

Posted by Andrew Robinson <an...@gmail.com>.
Just to add to your list
3) Create a "bookmark this page" link as part of each page (create a
custom control, or just use a facelets template) and have that link
represent all the query string parameters needed to re-build your
backing beans. Then, using managed properties or, if you use Seam, use
the @RequestParameter attribute, or just check the request parameters,
re-load the data. You could make a special servlet to auto-load data
as you see fit for these URLs as well.

There are many ways to approach this one, all with pros and cons.
Perhaps someone can build a reusable one at some point.

-Andrew

On 5/14/06, Jonathan Harley <jo...@parkplatz.net> wrote:
> 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: jon@parkplatz.net
>             Zac Parkplatz Ltd   .   Office Telephone: 024 7633 1375
>             www.parkplatz.net   .   Mobile: 079 4116 0423
>

Re: Bookmarking and Crawling of JSF

Posted by Jonathan Harley <jo...@parkplatz.net>.
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: jon@parkplatz.net
            Zac Parkplatz Ltd   .   Office Telephone: 024 7633 1375
            www.parkplatz.net   .   Mobile: 079 4116 0423

Re: Bookmarking and Crawling of JSF

Posted by Chrisi <ne...@googlemail.com>.
Hi Quintin,
Hi Francescon,

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"

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...

My conclusion:
---------------------
- JSF/myfaces shouldn't be used when building a public available
web-application that requires bookmarking and in particular indexing
through search engines like google.
- JSF/myfaces makes sense and helps a lot if you have to implement a
closed and in generall login protected application that makes heavy
use of forms and dynamic pages (e.g. if you use Ajax you also have
these problems with bookmarking and searchengines)

For me its out of all reason why the designer of JSF ignore the
fundamental requirement of being web-conform. It had have to be a
major requirement to return adequate URLs on  JSF requests?!

Another question:  Why haven't the smart people of Apache myfaces
present a easy to use solution for this?  It would be very nice if the
myfaces JSF implementation presents a extension which guarantees nice
URLs (and therefore Bookmarking and search-engine compatibility).  I'm
sure that a working myfaces extension will be integrated in the JSF
spec in future.
But it doesn't seems to be that easy... ;)

Greetings
Chrisi

Re: Bookmarking and Crawling of JSF

Posted by Francesco Consumi <co...@istitutodeglinnocenti.it>.
Quoting Quintin Kerby <qk...@caci.com>:

> One way to do it is mark all your navigation for redirect.  This can cause
> some loss of functionality in some of the request scope stuff, though.
>
> I've never implemented anything in JSF that was meant to be bookmarked,
> though.  My biggest use has been for things like scrolling though filtered
> results, using wizards, setting preferences, etc.


We implemented some site completely bookmarkable in JSF. We obtained  
this result mainly by using outputLinks instead of commandLinks for  
passing parameters to pages.
two examples are: www.istitutodeglinnocenti.it and  
www.emozionifotografiche.it (this one in italian only, sorry!).

-- 
Francesco Consumi
Ufficio Sistemi informativi
Istituto degli Innocenti
Piazza SS.Annunziata, 12
50122 Firenze
consumi at istitutodeglinnocenti.it
Tel. +39 055 2037320
ICQ# 12516133



Re: Bookmarking and Crawling of JSF

Posted by Quintin Kerby <qk...@caci.com>.
One way to do it is mark all your navigation for redirect.  This can cause 
some loss of functionality in some of the request scope stuff, though.

I've never implemented anything in JSF that was meant to be bookmarked, 
though.  My biggest use has been for things like scrolling though filtered 
results, using wizards, setting preferences, etc.

Google has this same issue with their maps.  Go to maps.google.com and you 
will see a 'Link to this page' link that redirects you using parameters to 
get back to that exact page.

Quintin Kerby
CACI, Inc.



Chrisi <ne...@googlemail.com> 
05/13/2006 13:43
Please respond to
"MyFaces Discussion" <us...@myfaces.apache.org>


To
"users@myfaces.apache.org" <us...@myfaces.apache.org>
cc

Subject
Bookmarking and Crawling of JSF






Hello,
 
I know this one seems to be an FAQ, but I didn't find a satisfying answer, 
yet. Sorry!
 
The inability to bookmark and be properly indexed by search engines seems 
to be the biggest downsides of JSF.
Applications which require to be found from Google and Co., can't be 
implemented using JSF / MyFaces.
 
Or did I miss something?
Is there a way in myfaces to generate unique URL by using a GET request?
 
Thanks and Greetings
Chrisi