Forums de discussion

tomcat/temp/xx-portlet directory

Jan Phillip Höft, modifié il y a 15 années.

tomcat/temp/xx-portlet directory

New Member Publications: 4 Date d'inscription: 31/07/08 Publications récentes
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!
edwin edwin foe, modifié il y a 15 années.

RE: tomcat/temp/xx-portlet directory

New Member Publications: 2 Date d'inscription: 19/12/08 Publications récentes
i have the same problem!? any suggestions?

Edwin
thumbnail
Dave Morris, modifié il y a 14 années.

RE: tomcat/temp/xx-portlet directory

Junior Member Publications: 27 Date d'inscription: 07/05/09 Publications récentes
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
Baris Sener, modifié il y a 14 années.

RE: tomcat/temp/xx-portlet directory

Expert Publications: 278 Date d'inscription: 23/06/09 Publications récentes
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
Baris Sener, modifié il y a 14 années.

RE: tomcat/temp/xx-portlet directory

Expert Publications: 278 Date d'inscription: 23/06/09 Publications récentes
Also once you shutdown the server, everything in temp will be transferred to tomcat/webapps folder.
thumbnail
Rajeeva Lochana .B.R, modifié il y a 13 années.

RE: tomcat/temp/xx-portlet directory

Junior Member Publications: 67 Date d'inscription: 04/01/10 Publications récentes
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
Dhandapani S, modifié il y a 11 années.

RE: tomcat/temp/xx-portlet directory

Regular Member Publications: 176 Date d'inscription: 24/03/09 Publications récentes
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
Muzakir Khan, modifié il y a 11 années.

RE: tomcat/temp/xx-portlet directory

Regular Member Publications: 112 Date d'inscription: 15/03/12 Publications récentes
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
Dhandapani S, modifié il y a 11 années.

RE: tomcat/temp/xx-portlet directory

Regular Member Publications: 176 Date d'inscription: 24/03/09 Publications récentes
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
David H Nebinger, modifié il y a 11 années.

RE: tomcat/temp/xx-portlet directory

Liferay Legend Publications: 14919 Date d'inscription: 02/09/06 Publications récentes
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.
shrikanth shrikanth, modifié il y a 9 années.

RE: tomcat/temp/xx-portlet directory

Regular Member Publications: 118 Date d'inscription: 11/12/13 Publications récentes
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
Alexis Araya, modifié il y a 9 années.

RE: tomcat/temp/xx-portlet directory

Junior Member Publications: 37 Date d'inscription: 08/10/13 Publications récentes
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