In y servlet class doGet method what I want to be able to do is to send a 200 ok response as soon as I get a request and then do the processing. I know to set response to 200 ok i will simply do response.setStatus (200). But how do I sent the request right after this? I think it is using response.flushBuffer() but I would appreciate if someone can confirm this for me. Plus I want to be able to run code after sending response. My java code that has nothing to do with servlet but after sending response.
You could use messaging (adds a lot of overhead) to start a new set of precesses independent of the original servlet that would avoid starting a new thread explicitly.
For a J2EE system, this is a good solution since its scalable and since spawning threads is not recommended by J2EE guidelines. For smaller or simpler systems though, using messaging is probably too much work to set up. [ December 16, 2005: Message edited by: Scott Selikoff ]
I am a new developer and dont know what you mean by messaging. But here is the code from my servlet class. Can you or Bear please tell me if I am doing it the right way. My goal is to complete the task but before completing it send the response back and then keep doing my thing because it will going to take time.