Anchor taglib ver. 1.1


    Custom JSP tags library lets you delete anchor from the source URL. The modern approach for making Ajax sites crawlable requires to use URL's with anchors. E.g. some Facebook URL looks so for example: http://www.facebook.com/#!/user_id. Twitter does the same etc.

Briefly, the solution works as follows: the crawler finds a pretty AJAX URL (that is, a URL containing a #! hash fragment). It then requests the content for this URL from your server in a slightly modified form. Your web server returns the content in the form of an HTML snapshot, which is then processed by the crawler. The search results will show the original URL. See google site for details.

If you are processing such URL's in JSP than request.getRequestURI() returns only a part of the original URL (before #). This taglib lets you create a JavaScript code on the top of your page that deletes anchor from the original URL and redirects request back to your page. For example:
 


<%@ taglib uri="taglib.tld" prefix="an" %>

<an:Anchor/>

after executing this code your page will be requested again without anchor in the URL

Tags are:

Anchor

Body tag lets you eliminate anchor part of the source URL. Attributes are: none

for downloading:

Library: anchortag.jar    Description: taglib.tld

 © Coldbeans      Comments?

See also Coldtags suite - the largest collection of custom JSP tags.

Also in Coldtags: