I have a requirement that all servlets in an application return immediately and with a standard response. Any processing needs to be done offline.
I could have the servlet log the request to a database for a separate application to pick up. However I was hoping to still do all the work in the servlet.
We are using an apache/tomcat webserver, java 1.4.2 and the standard logger java.util.logging.Logger. My solution so far is for the servlet to kick off a Thread (defined as an inner class in the same file as the servlet) to do the work and let the doGet respond back to the requestor.
This works fine with one problem. Logging.
Any logger calls in the thread log to catalina.out while logger calls in the doGet log to the correct application log file defined in the tomcat configuration.
Any ideas how this can be resolved ?
I could have the servlet log the request to a database for a separate application to pick up. However I was hoping to still do all the work in the servlet.
We are using an apache/tomcat webserver, java 1.4.2 and the standard logger java.util.logging.Logger. My solution so far is for the servlet to kick off a Thread (defined as an inner class in the same file as the servlet) to do the work and let the doGet respond back to the requestor.
This works fine with one problem. Logging.
Any logger calls in the thread log to catalina.out while logger calls in the doGet log to the correct application log file defined in the tomcat configuration.
Any ideas how this can be resolved ?