I have requirement to write help(for example show description of what some button does) for my web app. Are there any good examples for doing this?
Java Doc can be used to extract all the comments incorporated inside the java code file
Have a look at JavaHelp. Emulates the help system found in older versions of Windows
It's very modern to write the documentation in a Wiki. It's easy to edit, nice to structure etc.
But I hate it. I really hate it. It's never well structured and easy to read. There's much effort you have to put into a wiki to make it good.
So I recommend to use a simple CMS. No overkill, just text edit with links. You have the option to integrate it into your webapp and there's the possibility to extract a PDF from it.
This is neat for offering an offline help for printing etc.
I'd just use good old HTML/CSS - this will maintain the behavior users already know in a browser and you should already have the style-sheet for the application so you'll maintain the L&F through the help pages with little additional effort.
Take a look at the help on Google Maps (http://maps.google.co.uk/support/) - for layout ideas, etc.
One thing I did notice when I looked at the Google help pages was the search (no surprises there), which might be a little trickier - if your site is external facing then I'd implement this with the 'site:<your site>' keyword and use Google search. If your site is internal you'll have to roll your own search, but that shouldn't be too hard and would probably be quite a fun sub-project.
If you're using PHP, take a look at phpDocumentor.
The phpDocumentor tool is a standalone auto-documentor similar to JavaDoc written in PHP.
If you are looking at producing a user manual illustrating what each button does, I've found using something like Debugmode Wink or Adobe Captivate useful for recording the screen interaction and then converting it to either a Flash movie or PDF.
Specifically for Rails: http://github.com/darthapo/comatose/tree/master is a great little CMS tool that you can use for imbedded help systems.
Otherwise, http://tenderapp.com/ works nicely as a hosted solution.
I have found the help in the build engine Hudson to be very elegant and discrete.
You have a help icon, you click on it, the help text is expaned inline the page, you click again it disappears.
Try starting https://hudson.dev.java.net/hudson.jnlp and go tohttp://localhost:8080/configure and click the many (?) buttons in the right side.