掲示板

tomcat/temp/xx-portlet directory

15年前 に Jan Phillip Höft によって更新されました。

tomcat/temp/xx-portlet directory

New Member 投稿: 4 参加年月日: 08/07/31 最新の投稿
Hello everybody,
I'm trying to develop a portlet which shows dynamicaly generates images. Therefor I save the images in "contextPath/images/". But if I hotdeploy my portlet, liferay executes it in "/tomcat/temp/xx-contextPath" directory, where xx is an index.
Because of this, liferay looks for the images in "/tomcat/temp/xx-contextPath/images" instead of "/tomcat/webapps/contextPath/images".

Any suggestions, how to get the xx-path, or where to save the images?

Thx for any help!
15年前 に edwin edwin foe によって更新されました。

RE: tomcat/temp/xx-portlet directory

New Member 投稿: 2 参加年月日: 08/12/19 最新の投稿
i have the same problem!? any suggestions?

Edwin
thumbnail
14年前 に Dave Morris によって更新されました。

RE: tomcat/temp/xx-portlet directory

Junior Member 投稿: 27 参加年月日: 09/05/07 最新の投稿
Has anyone come across a resolution to this issue? I am facing the same thing right now, and it's very confusing. Thanks for the help,

Dave Morris
14年前 に Baris Sener によって更新されました。

RE: tomcat/temp/xx-portlet directory

Expert 投稿: 278 参加年月日: 09/06/23 最新の投稿
The path should be the name of your portlet. For example if your portlet's name is "Sweaty-Balls", it should be located at tomcat/temp/01-Sweaty-Balls. The number before the portlet name may change depending on how many times you deployed. Like 01,02,03....,08 and so on...

Baris
14年前 に Baris Sener によって更新されました。

RE: tomcat/temp/xx-portlet directory

Expert 投稿: 278 参加年月日: 09/06/23 最新の投稿
Also once you shutdown the server, everything in temp will be transferred to tomcat/webapps folder.
thumbnail
13年前 に Rajeeva Lochana .B.R によって更新されました。

RE: tomcat/temp/xx-portlet directory

Junior Member 投稿: 67 参加年月日: 10/01/04 最新の投稿
Hi Jan Phillip Höft ,

how to get the xx-path (tomacat/temp/xx-path)?


Solution: getServletContext().getRealPath("/") use this

It give path for ex: IN Windows C:\...\tomcat\temp\01-image\
IN Linux /opt/../tomcat/temp/01-image/


Thanks

Rajeeva Lochana.B.R
thumbnail
11年前 に Dhandapani S によって更新されました。

RE: tomcat/temp/xx-portlet directory

Regular Member 投稿: 176 参加年月日: 09/03/24 最新の投稿
Hi All,

Rajeeva, solution which you are referring is solving the issue. "Secret Developer" thread says after shutdown server, temp folder will be moved to webapps. So My point of view is that i didnt shutdown the server, If i redeploy the portlet with updated image, will it take that new image from webapps, or still will load the old image from temp?

In general, context path means it should refer from webapps/context only,,, Why its refereing temp folder which outside webapps.

Thanks in advance

Regards
Dhans006
thumbnail
11年前 に Muzakir Khan によって更新されました。

RE: tomcat/temp/xx-portlet directory

Regular Member 投稿: 112 参加年月日: 12/03/15 最新の投稿
Dhandapani S:


So My point of view is that i didnt shutdown the server, If i redeploy the portlet with updated image, will it take that new image from webapps, or still will load the old image from temp?



If you didnt shutdown the server/restart the server, It will refer to webapps if you redeploy the portlet, and note that, once you shutdown the server, everything in temp will be transferred to tomcat/webapps folder.

Dhandapani S:

In general, context path means it should refer from webapps/context only,,, Why its refereing temp folder which outside webapps.


how come you are sure that its refering temp folder which is outside webapps??..
Can you still be clear??..

Regards
Muzakir Khan
thumbnail
11年前 に Dhandapani S によって更新されました。

RE: tomcat/temp/xx-portlet directory

Regular Member 投稿: 176 参加年月日: 09/03/24 最新の投稿
Hi,

When i deploy my portlet, Its coming under webapps and temp both folder.

I have one xml file under my portlet/chart-files/abc.xml. I want to read this xml file and generate as chart in my portlet.

When i am uploading new xml file from the same portlet. its updating under webapps/myportlet/chart-files/abc.xml successfully.
But after i upload , when i read for display chart still its taking from temp/ not from webapps.

Regards

Dhans006
thumbnail
11年前 に David H Nebinger によって更新されました。

RE: tomcat/temp/xx-portlet directory

Liferay Legend 投稿: 14919 参加年月日: 06/09/02 最新の投稿
You are not supposed to be modifying any files in the webapps folder when running. It is meant to be a static resource for the application container. The app container will use the temp folder to cache information it is generating/using on behalf of the running application.
9年前 に shrikanth shrikanth によって更新されました。

RE: tomcat/temp/xx-portlet directory

Regular Member 投稿: 118 参加年月日: 13/12/11 最新の投稿
Hello frds,
I'm trying to develop a portlet which upload file in a folder. Therefor I save the file in "FilePorlet/file". But if I hot deploy my portlet,
liferay executes it in "/tomcat/temp/xx-File" directory, where xx is an index.
Because of this, liferay looks for the file in "/tomcat/temp/xx-File/file" instead of "/tomcat/webapps/FilePortlet/file".

Any suggestions, how to get the xx-path, or where to save the file?

its working fine in Local Pc the problem its coming Development server.when iam retriving before Restart it trowing 404 error.but after restartiam getting File.can u plz tell me how to upload file in server in webapps not in temp


Regards
Shrikanth
thumbnail
9年前 に Alexis Araya によって更新されました。

RE: tomcat/temp/xx-portlet directory

Junior Member 投稿: 37 参加年月日: 13/10/08 最新の投稿
shrikanth shrikanth:
Hello frds,
I'm trying to develop a portlet which upload file in a folder. Therefor I save the file in "FilePorlet/file". But if I hot deploy my portlet,
liferay executes it in "/tomcat/temp/xx-File" directory, where xx is an index.
Because of this, liferay looks for the file in "/tomcat/temp/xx-File/file" instead of "/tomcat/webapps/FilePortlet/file".

Any suggestions, how to get the xx-path, or where to save the file?

its working fine in Local Pc the problem its coming Development server.when iam retriving before Restart it trowing 404 error.but after restartiam getting File.can u plz tell me how to upload file in server in webapps not in temp


Regards
Shrikanth



Has podido solucionar el tema??

yo tengo el mismo problema que se los archivos se suben a un directorio temporal y al volver deployar se pierden los archivos.

sldos