Definitely do not use long running threads inside a Java web app. Send a message with the task (ideally via a queue (for example rabbitmq)) to a separate application with its own thread pool, which will then handle independently the long running tasks requested by the webapp users.
If your system does not have a messaging system installed, and you find the overhead of managing one too high, and you are already using some sql or no-sql or whatever storage, you can probably adapt this storage to also be used for communication between the webapp and your new separate long requests runner app.