Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Jan Phillip Höft
tomcat/temp/xx-portlet directory
July 30, 2008 11:50 PM
Answer

Jan Phillip Höft

Rank: New Member

Posts: 4

Join Date: July 30, 2008

Recent Posts

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
RE: tomcat/temp/xx-portlet directory
March 25, 2009 2:34 AM
Answer

edwin edwin foe

Rank: New Member

Posts: 2

Join Date: December 19, 2008

Recent Posts

i have the same problem!? any suggestions?

Edwin
Dave Morris
RE: tomcat/temp/xx-portlet directory
June 15, 2009 10:35 PM
Answer

Dave Morris

Rank: Junior Member

Posts: 27

Join Date: May 7, 2009

Recent Posts

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
Secret Developer
RE: tomcat/temp/xx-portlet directory
July 7, 2009 12:48 PM
Answer

Secret Developer

Rank: Expert

Posts: 278

Join Date: June 23, 2009

Recent Posts

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
Secret Developer
RE: tomcat/temp/xx-portlet directory
July 7, 2009 1:05 PM
Answer

Secret Developer

Rank: Expert

Posts: 278

Join Date: June 23, 2009

Recent Posts

Also once you shutdown the server, everything in temp will be transferred to tomcat/webapps folder.
Rajeeva Lochana .B.R
RE: tomcat/temp/xx-portlet directory
January 6, 2011 1:39 AM
Answer

Rajeeva Lochana .B.R

Rank: Junior Member

Posts: 57

Join Date: January 4, 2010

Recent Posts

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
Dhandapani S
RE: tomcat/temp/xx-portlet directory
July 12, 2012 11:08 PM
Answer

Dhandapani S

Rank: Regular Member

Posts: 156

Join Date: March 24, 2009

Recent Posts

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
Muzakir Khan
RE: tomcat/temp/xx-portlet directory
July 13, 2012 12:04 AM
Answer

Muzakir Khan

Rank: Regular Member

Posts: 112

Join Date: March 14, 2012

Recent Posts

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
Dhandapani S
RE: tomcat/temp/xx-portlet directory
July 13, 2012 1:42 AM
Answer

Dhandapani S

Rank: Regular Member

Posts: 156

Join Date: March 24, 2009

Recent Posts

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
David H Nebinger
RE: tomcat/temp/xx-portlet directory
July 13, 2012 11:17 AM
Answer

David H Nebinger

Rank: Liferay Legend

Posts: 7008

Join Date: September 1, 2006

Recent Posts

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 k shrikanth
RE: tomcat/temp/xx-portlet directory
July 10, 2014 10:13 PM
Answer

shrikanth k shrikanth

Rank: Junior Member

Posts: 97

Join Date: December 10, 2013

Recent Posts

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
Alexis Araya
RE: tomcat/temp/xx-portlet directory
August 19, 2014 10:44 AM
Answer

Alexis Araya

Rank: Junior Member

Posts: 28

Join Date: October 8, 2013

Recent Posts

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