For many reasons, it is not recommended to use streams inside the servlet.
java.util.Timer seems to be a wrapper around a thread. So is it also unsafe to use it? If so, what is the safest way to schedule a task in a servlet?
java multithreading timer servlets scheduling
mebada
source share