I need to create text file on the WebServer hosting my application through http protocol. When user clicks on link then application should write the information displayed on the browser in a text file using http protocol.
I am not entirely sure what you are trying to accomplish - what set up are you using? If you are using JSP or servlets, then when the user clicks on the link, you can pass whatever information you want to save to the file to a JSP or servlet and use a File (java.io.File) object to write data on to the hard drive of the server. If that isn't what you are trying to do, please follow up and clarify your objectives.
use the [CODE] tags - it makes it much easier for people to help you.