Tomcat 临时目录位置是如何定义的?

发布于 2024-09-01 06:40:08 字数 656 浏览 3 评论 0原文

我正在运行与 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 Settings\user\Local Settings\Temp\ 目录。但是,如果我直接使用startup.bat脚本启动Tomcat,Liferay/Tomcat将使用Tomcat临时目录。我不知道 Eclipse、Liferay 或 Tomcat 是否正在决定使用哪个临时目录或如何更改它。我更喜欢使用 Tomcat 临时目录。

我的 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 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.

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).

Anybody have any clues?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

挖鼻大婶 2024-09-08 06:40:08

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

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

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

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

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

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"
温柔戏命师 2024-09-08 06:40:08

虽然我仍然不知道 Tomcat 在哪里/如何确定默认临时目录应该在哪里,也不知道为什么 Eclipse 将其设置为不同的内容,但我发现您可以在启动 Tomcat 时通过 VM 参数设置临时目录在 Eclipse 中:

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

Although I still don't know where/how Tomcat determines where the default temp directory should be, nor do I know why Eclipse sets it to something different, I have found out that you can set the temp directory via a VM argument when starting Tomcat in Eclipse:

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

提笔落墨 2024-09-08 06:40:08

您可以在工作区中找到以下文件夹结构:

.metadata.plugins\org.eclipse.wst.server.core\tmp0\

在这里您将找到 eclipse 中 tomcat 附带的文件夹。

You can find the following folder structure in your workspace:

.metadata.plugins\org.eclipse.wst.server.core\tmp0\

Here you will find the folder which is attached with tomcat in eclipse.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文