I have created a standard java application that runs infinitely. (and do some logic)
I would like to setup a web-server that for each user request - will dynamically create a webpage (VIA JSP) that defines the application state in that specific time.
My question is:
where do i run\start the application ? i mean, it supposed to run indefinitely on the background.
i thought maybe make this app as a thread, and when the first user make a HTTP request , a jsp code makes a new thread and start it..
problem is: when i do that the web-server not responding to new requests. (i guess it waits for the thread to stop?)..
i could think of a solution which is very ugly: to run the application separately from the web-server.
and let them communicate via sockets...
any other solutions?