掲示板

How to get the absolute path without hard coding

12年前 に hema polu によって更新されました。

How to get the absolute path without hard coding

New Member 投稿: 7 参加年月日: 12/01/30 最新の投稿
I am trying to get the absolute path of the liferay application. Thanks in advance
thumbnail
12年前 に David H Nebinger によって更新されました。

RE: How to get the absolute path without hard coding

Liferay Legend 投稿: 14918 参加年月日: 06/09/02 最新の投稿
On the filesystem? Wouldn't you just create a File() on one of the files and then get the absolute path using that?
thumbnail
12年前 に Hitoshi Ozawa によって更新されました。

RE: How to get the absolute path without hard coding

Liferay Legend 投稿: 7942 参加年月日: 10/03/24 最新の投稿
Do you mean getting value of the environmental variable during runtime?
12年前 に hema polu によって更新されました。

RE: How to get the absolute path without hard coding

New Member 投稿: 7 参加年月日: 12/01/30 最新の投稿
Thank you for reply.
I want to create a file in Liferay application docroot folder. Let say I have images folder in docroot, I supposed to create .jpg file in images folder
thumbnail
12年前 に Hitoshi Ozawa によって更新されました。

RE: How to get the absolute path without hard coding

Liferay Legend 投稿: 7942 参加年月日: 10/03/24 最新の投稿
Can't you just upload your image into Liferay's image library? This way, all your permissions will be effective too.