Setting the response Content
I am doing the image retrieval from the server. here i need a progress bar which will show the progress information of the image retrieval.
i feel that if i set the contentlength in the HttpServletResponse object , the i can get total object which is coming over the network.
i kept the code like this
here image is my own object. which is having some size. so at the client side
URL url=new URL("http://localhost/servlet/ServerServlet");
System.out.println("The content length is"+length);
so here i am getting the contentlength is -1, though i specified the content length as image size.
please tell me how to get the progressbar while retriving the image from the server. and the contentlength which i specified.