【发布时间】:2010-08-09 11:43:05
【问题描述】:
我有一个 GWT 应用程序。我正在将它部署在tomcat中。在 servlet 中,我想编写一些代码来创建一个临时文件。现在正在使用 file = new File("./../webapps"+this.getThreadLocalRequest().getContextPath()+"/svg/temp/"+svgName);
但由于“webapps”硬编码的原因,这可能不适用于所有 Web 服务器。请帮助我解决这个问题。
ps: 1) servlet 扩展了 RemoteServiceServlet。 2) "/svg/temp/"+svgName 是我的应用程序特定的。
【问题讨论】:
标签: java web-applications gwt