Thanks Jon,
Well,I guess thats pretty much the only option unless I get the Apache
source code and make the changes and compile it!..I had a doubt over
here.How do you handle multiple users accessing the same servlet of
yours.I mean,at the same time if 2/more users access your servlet and
consider for a moment that,what one person requires to be done from the
servlet is different from what the other person wants.basically if the
parameters are different,i dont see how you can handle multiple users
accessing the servlet and being provided the results they asked
for.Probably there is a way,but I'm ignorant here and would like to know
if and how its possible.
Regards,
Shravan
On Mon, 23 Apr 2001, Jon Barber wrote:
> Hi Shravan,
>
> I've recently had the same situation and we solved it thus :
>
> Encapsulate the lengthy process in an object that implements Runnable,
> complete with an isFinished() call. Start a seperate thread to execute this
> and place the object in the httpsession. Send a page back to the user with,
> say, a 5 second refresh which updates the user on the status of the process.
>
> It's not ideal, as it is a form of polling, but it gives the opportunity for
> user feedback. We cached the last 5 processing times and could give an ETA
> to the user based on the mean.
>
>
> Jon.
>
> On Monday 23 April 2001 08:13, Shravan Shashikant wrote:
> > Hi there,
> > I have a problem with a certain servlet code of mine which takes a lot
> > of time to execute.The problem is that since it takes a lot of time to
> > execute,the browser times out the servlet after say 5 minutes.I heard
> > somewhere that this can be remedied by using out.flush() for the output
> > stream;that didnt work and i learnt later that the problem is actually
> > with Apache which buffers output in 8k units.I was wondering whether this
> > setting could be changed or if there were any other solution to this
> > problem.I looked at certain threading issues but am generally
> > uncomfortable using the meta header and refreshing it every 10
> > seconds,till the thread of the task is completed.
> > Also,found out that we can increase the timeout for the apache web
> > server by changing the httpd.conf file.But is there anyway to reduce the
> > output buffer size?
> > Thanks & Regards,
> > Shravan
>