Dear friends,
 
While using servlets, I want to write to HttpResponse object a html file whose contents are stored in a string  object whose size is
50000 bytes.But when the control reaches the following line, program is hanging and not able to write to the Print stream.The code is given below.When the string size is small no problem occurs and this problem arises only if String size exceed say 30000 bytes.
Can you please help me to over come  this problem
 
URL url = new  URL("http://www.keralatalkies.com");
URLConnection urlCon = url.openConnection();
InputStream input = urlCon.getInputStream();
BufferedReader in = new BufferedReader(new InputStreamReader(input));
PrintWriter out = response.getWriter();
String  st1="";
String temp_st=""l;
  
        while((temp_st=in.readLine())!=null)
        {
   
           st1+=temp_st+"\n";
      
      }
 out.println(temp_st);  

Reply via email to