Something's wrong here. I wrote a fairly detailed explanation on why spawning threads in web code is forbidden. The posting has vanished.
Short answer, however, is that the
thread a request is processed under isn't permanently attached to the servlet. Instead, it's pulled from a common thread pool. The servlet code (this includes JSPs) runs under that thread, and it should complete as quickly as possible in order to keep the thread pool from being drained dry.
All of the threads in the execution thread pool should be identical - otherwise it's not a reliable pool. If you spawn a child thread under the servlet thread and that thread goes back to the pool, it's no longer identical. And it will later be passed to another request that doesn't realize that there's excess baggage already attached to the servlet handler pool thread. Results are unpredictable. You could crash the request. You could crash the app. Or you could crash Tomcat itself.
If you spawn a child thread and wait for it to terminate before finishing the web request, you're violating the "get-it-done-quick" convention. This can cause exhaustion of the thread pool and drag down the performance of the server.
So don't spawn threads in servlet request handling code. If you need threads, spawn them from a non-servlet part of the app such as a ServletContextListener.