如何在jetty9中更改临时目录? [英] How to change the temporary directory in jetty9?

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

问题描述

我想为码头建立一个临时目录,并将默认的/tmp目录更改为我的临时目录,我尝试过

I want to make a temp directory for my jetty and change the default /tmp directory to mine temp directory, I tried this

java -Djava.io.tmpdir=/home/jetty/temp

当我要启动码头并且可以正常工作时,但是我正在寻找一种方法来永久更改temp目录.是否有任何配置或xml或我可以更改的内容?

When I want to start my jetty and it worked, but I'm looking for a way to change the temp directory once and for all. Is there any configuration or xml or something that I can change?

推荐答案

是否要更改Web应用程序的工作目录?还是可能在Jetty下运行的所有进程的整体临时目录?

Are you wanting to change the working directory for your webapp? or the overall temp directory for all processes that might be running under Jetty?

对于特定于Web应用程序的情况,请参阅有关更改Web应用程序临时目录的先前答案.

For the webapp specific case, see the prior answer about changing the temp directory for webapps.

对于码头的所有流程,将以下两行添加到${jetty.base}/start.ini

For all processes in jetty, add the following 2 lines to your ${jetty.base}/start.ini

--exec
-Djava.io.tmpdir=/home/jetty/temp

注意:这将导致jetty-dist/start.jar为 码头服务器.

Note: this will cause jetty-dist/start.jar to fork a new process for Jetty server.

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

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