Marcelo Ametller wrote:
> I have a servlet with form and a button label “import”
> the action for the 'button' is a function that takes a file .txt and
> enters it, into a postgresql/table.
> I need that this function goes off from the button, at the browser, but
> as it consumes many resources (memory,threads), that the fall of
> appserver does not cause.
Span a completely separate process. You can store the pid of the process
in your session so servlets can check whether the process is still
running. The process could also signal "done" by creating a certain file
or writing something to the database.
Process management is described in section 6.1.5 of the Python standard