I have a GWT app. Am deploying it in tomcat. Within the servlet i want to write some code to create a temporary file. Right now am using file = new File("./../webapps"+this.getThreadLocalRequest().getContextPath()+"/svg/temp/"+svgName);
But this might not hold true for all web servers due to the 'webapps' hardcoding thing. Please help me out as of how can i solve this problem.
ps: 1) The servlet extends RemoteServiceServlet. 2) "/svg/temp/"+svgName is my app specific.