Home
2008:
January
February
March
April
May
June
July
August
2007:
January
February
March
April
May
June
July
August
September
October
November
December
2006:
January
February
March
April
May
June
July
August
September
October
November
December
2005:
January
February
March
April
May
June
July
August
September
October
November
December
2004:
January
February
March
April
May
June
July
August
September
October
November
December
2003:
January
February
March
April
May
June
July
August
September
October
November
December
2002:
January
February
March
April
May
June
July
August
September
October
November
December
2001:
January
February
March
April
May
June
July
August
September
October
November
December
2000:
April
May
June
July
August
September
October
November
December

(keitai-l) Re: "i-appli taking long time connecting to servlet"

From: Kapil Sharma <kapes.endless_at_gmail.com>
Date: 06/09/05
Message-ID: <e4569d7f05060903513a20e086_at_mail.gmail.com>
 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