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

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

问题描述

我正在运行与 Liferay5.2.3 捆绑在一起的 Tomcat,并使用 Eclipse 3.5 (Galileo) 作为我的 IDE.我按照这个博客条目在 Eclipse 中设置了我的 Tomcat 服务器:http://www.jroller.com/holy/entry/developing_portlets_for_liferay_in.如果我通过 Eclipse 服务器配置启动 Tomcat,Liferay/Tomcat 将使用我的 C:Documents and SettingsuserLocal SettingsTemp 目录.但是,如果我直接使用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 SettingsuserLocal SettingsTemp 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.3.zip 和 liferay-portal-tomcat-5.5-5.2.3.zip)都有这个问题.

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 Filesliferay-portal-5.2.3-tomcat-6.0	omcat-6.0.18	emp"

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

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