如何定义Tomcat临时目录位置? [英] How is the Tomcat temp directory location defined?

查看:121
本文介绍了如何定义Tomcat临时目录位置?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在运行与Liferay5.2.3捆绑的Tomcat,并使用Eclipse 3.5(Galileo)作为我的IDE。我根据这个博客条目在Eclipse中设置了我的Tomcat服务器: http://www.jroller.com /圣/项/ developing_portlets_for_liferay_in 。如果我通过Eclipse服务器配置启动Tomcat,Liferay / Tomcat使用我的C:\Documents和Settings\user\Local Settings\Temp\目录。但是,如果我使用startup.bat脚本直接启动Tomcat,Liferay / Tomcat将使用Tomcat临时目录。我不知道Eclipse,Liferay或Tomcat是否决定要使用哪个临时目录或如何更改它。我喜欢使用Tomcat临时目录。

I am running Tomcat bundled with Liferay5.2.3 and use Eclipse 3.5 (Galileo) as my IDE. I set up my Tomcat server in Eclipse as per this blog entry: http://www.jroller.com/holy/entry/developing_portlets_for_liferay_in. If I start Tomcat via the Eclipse server config, Liferay/Tomcat uses my C:\Documents and Settings\user\Local Settings\Temp\ directory. However, if I start Tomcat directly using the startup.bat script, Liferay/Tomcat uses the Tomcat temp directory. I can't figure out if Eclipse, Liferay or Tomcat is deciding which temp directory to use or how to change it. I would prefer to use the Tomcat temp directory.

我的Lifera / Tomcat软件包5.5和6.0(liferay-portal-tomcat-6.0-5.2)都有这个问题。

I have this issue with both the Lifera/Tomcat bundles 5.5 and 6.0 (liferay-portal-tomcat-6.0-5.2.3.zip and liferay-portal-tomcat-5.5-5.2.3.zip).

任何人都有任何线索?

推荐答案

当您使用catalina.sh(或catalina.bat)启动Tomcat时,临时目录使用CATALINA_TMPDIR变量设置:

When you start Tomcat with catalina.sh (or catalina.bat), the temp directory is set with the CATALINA_TMPDIR variable:

if [ -z "$CATALINA_TMPDIR" ] ; then
# Define the java.io.tmpdir to use for Catalina
    CATALINA_TMPDIR="$CATALINA_BASE"/temp
fi

此外,您可以在Eclipse中启动Tomcat时将其作为VM参数传递,以将其用作临时目录。

Also you can pass below as VM argument while starting Tomcat in Eclipse to use it as temp directory.

-Djava.io.tmpdir="C:\Program Files\liferay-portal-5.2.3-tomcat-6.0\tomcat-6.0.18\temp"

这篇关于如何定义Tomcat临时目录位置?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆