Hi All We have a .WAR file which make use of the "javax.servlet.context.tempdir" implementation. Here we keep some configuration entries made by the user and use it at run time. This works fine with Tomcat, WebSphere 5.x but weblogic 7.0, we face strange problem. The moment we restart the web application [ not the weblogic server ] , this temp directory gets deleted ! So the application lost all the information in the configuration files given by the user. This is really a horrible problem, and till now I couldn't find any solution. I am not sure whether this "javax.servlet.context.tempdir" is not so used common for this kind of storage or this is a specific issue with a specific version of weblogic [ I don't know whether this will work with weblogic 8.1 or not]. So if any of you know the solution or history of this issue please update. Thanks in advance.
ARS Kumar, Sun Certified Programmer for Java 2 Platform
Hi, According to the specification of the servlets : SRV.3.7.1 Temporary Working Directories A temporary storage directory is required for each servlet context. Servlet containers must provide a private temporary directory per servlet context, and make it available via the javax.servlet.context.tempdir context attribute. The objects associated with the attribute must be of type java.io.File. The requirement recognizes a common convenience provided in many servlet engine implementations. The container is not required to maintain the contents of the temporary directory when the servlet container restarts, but is required to ensure that the contents of the temporary directory of one servlet context is not visible to the servlet contexts of other web applications running on the servlet container.