Thursday, October 16, 2008

Simple and very useful !!

There was a post on the Official Googleblog about fixing broken links on your page.

Eventhough this sounds very trivial, it is often forgotten.

Here is a short guide on how to use it in your (Java/J2EE/JEE) Webapplication.


  • Create your 404.jsp (copy it from the index.jsp) with the following header:     

    <%@ page language="java" isErrorPage="true" %>
  • Find the location where you want to show this Google error message.
  • Put the following code on that spot: 


    <style type="text/css"/>
    #goog-wm{}
    #goog-wm h3.closest-match{}
    #goog-wm h3.closest-match a { }
    #goog-wm h3.other-things { }
    #goog-wm ul li { }
    #goog-wm li.search-goog { display:block;}
    </style>
    <script type="text/javascript">
    var GOOG_FIXURL_LANG='nl';
    var GOOG_FIXURL_SITE='http://www.google.com';

    </script>
    <script type="text/javascript" src="http://linkhelp.clients.google.com/tbproxy/lh/wm/fixurl.js"></script>



  • Add the following code to your web.xml (the errorhandling for Java/J2EE/JEE apps in webapps)

    <error-page>
    <error-code>404</error-code>
    <location>/404.jsp</location>
    </error-page>

    <error-page>
    <exception-type>PageNotFoundException</exception-type>
    <location>/404.jsp</location>
    </error-page>







That's it. You can style it as you want, but since this is just text, it will follow your site style.

Friday, October 10, 2008

Google Search as RSS

Finally some great news from Google: The search results in RSS format.

Huh, RSS, Search results ? What does this mean ? Allow me to explain.

Remember iGoogle or GoogleReader? These are applications that can consume
RSS feeds. An RSS feed is in fact a list of items (news, images, etc).
Imagine that an RSS feed is dynamically updated and if provided through
the Web you will always have the latest items in the feed.


Now the interesting part: The search results as an RSS feed. This means
that anytime of the day, you'll see your most recent result for example
in iGoogle. For example if you want to know if your company is in the 10
results based on a number of keywords, than this is the way to (inactively)
keep track of it.


This is very interesting development on Google search. Soon this feature will be launched.

For more information, check this article.

Wednesday, October 1, 2008

Analytics for YouTube

YouTube has become very populair as a repository of videos (home made, tv programs, videoclips, photoslideshows, etc).  You can see the number of views just below your video.

But, ever wondered from where your video was watched ? Was is a male of female ?
Which part of the video was the most interesting ?

If you did wonder all this, then check out YouTube InSight! 

How ? Just login into YouTube. Click on 'My Account'  (or this link)

Then hover on the 'My Account' text on the middle left , then a popup menu will appear and the last entry is the "Insight: statistics". (try this link if you are already logged in) 

It's very interesting, so try it out !