H every body,
I want help urgently,how upload the .txt file and insert it into the database nd retrive that one in to my projectfolder atleast how to retrive the text file from database using jsp

First of all no one understood what do you want and what you are trying to accomplish. Some might have an idea what do you mean but your questions are too general. Please rephrase.

how to retrive the text file from database using jsp

You cannot use jsp to retrieve anything from database. You open a connection, you make queries to the DB you get the data using ResultSet. And for all that you have to create a class and write methods that do that.
If you want the results displayed in a jsp, then first call that class and the methods inside a jsp and then display the results you get.