Hello
I have Doja application (i-appli) which is taking continous stream of
images from the servlet running on tomcat engine
For the servlet sending normal text I got the response in just a 1-2
sec. but for this servlet which is taking the image from
Fileinputstream (the real path one)and sending into outputstream, it
is taking about 21 sec for connection OK response
::::::::::::::::::::::::::::::::::I want to
know:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
1. I am missing some server configuration which takes my servlet so
much time to respond to i-appli client(HTTP connection OK)
2. Or I need to change my tomcat servlet engine with another like
weblogic or websphere one that could be faster than my tomcat engine.
3. Or I have problem with the servlet API that i am using. I am not
sure but taking images in real path is consuming time
My servlet code looks like
//sending 5 image files to outputstream
for(i=1;i<=5;i++)
{
filename = sc.getRealPath("pic"+i+".jpeg" ;//get path of pic.
file = new File(filename);
mimeType = sc.getMimeType(filename);
resp.set ontentType(mimeType);
in = new FileInputStream(file);
count = in.read(buf);
out.writ (buf,0,count);
}
in.close );
out.clos ();
}
Any idea will be implemented.
Thanks in advance.
kapess
Received on Thu Jun 9 13:51:22 2005