but here the procedure run for the first time when i start my server and run the servlet , when i run the servlet again without restarting the server the control just go to the doGet method of the servlet and the procedure do not get executed.
init is executed once if the servlet gets put into service, and then not again. If you want to start the thread each time someone accesses the servlet, put the code into the doGet method. Make sure to check whether there's already a thread running if you do that, so that you don't end up with multiple threads.
Please suggets me how do i execute a procedure such that the front end of the application do not get locked.
A background thread like you're trying to implement accomplishes that.
also even ifi close the application the procedure should continue running.
If by "application" you mean the web app (or the servlet container itself) then that's not possible because the thread is part of it. But production servers and application rarely get shut down, and not without planning beforehand, so that shouldn't be much of a problem.
error == ""
Don't compare
string using the == operators; that's what the equals method is for.