Thanks you very much, It is working .. As per the Web component developer exam book-kathy sierra, the code is not working. I couldnt understand why that code in the book is not working. Then i included the content disposition header which made to work. When i used the code mentioned by me, the HelloWorld file was downloading instead of the file i requested. May i know the reason for it.