• Welcome to KonaKart Community Forum. Please login or sign up.

Images cache and tomcat

Started by bruno_tixtus, September 03, 2014, 05:50:35 pm

Previous topic - Next topic


Hi everyone,
I have a problem with the images folder on bundle liferay tomcat 7 (on mac), but I think that is the same problem with every tomcat implementations.

My configurations on konakartadmin are:
- Image base URL: http://localhost:8080/konakart/konakart/images
- Image base path: /Users/myuser/workspaces/appcontainers/portal-6.1.2-ce-ga3/tomcat-7.0.40/webapps/konakart/konakart/images
- Store-Front base: /konakart
- Store-Front image base: /konakart/images

With this data was posible view images on Konakartadmin and Konakart Liferay portlet... but, when a try to put my own images, only get a broken link image. I take a look in to structure of my new image link and was the same that the old images... no mayor diferences (just the number, no poblem).

old -> http://localhost:8080/konakart/konakart/images/prod/0/0/1/F/001F1EAA-2910-440E-BB8D-C714E0E859B4_1_big.jpg?r=1303004001

new -> http://localhost:8080/konakart/konakart/images/prod/0/0/1/F/001F1EAA-2910-440E-BB8D-C714E0E859B4_2_big.jpg?r=319957023

If I check on image folder (/tomcat-7.0.40/webapps/konakart/konakart/images/prod/0/0/1/F/) the file "001F1EAA-2910-440E-BB8D-C714E0E859B4_2_big.jpg" exists (with the others version too: _tiny, _small and _medium) then, uploader is working good.

If copare /tomcat-7.0.40/webapps/konakart/konakart/images with /tomcat-7.0.40/temp/0-konakart/konakart/image/ new files are not in the temp folder. For this observation, I restarted the server. In this process, new files was copied to temp solving my problem. But my question is: Is necesary restart tomcat every time that a upload a new image? or what is the right configuration to enable inmediately new images.

My best regards
(sorry for my english, I'm spanish speaker).


This is a very good question that I don't know how to solve at the moment.

If you run KonaKart using the out-of-the-box demo which uses tomcat you see images in the storefront that you upload in the Admin app immediately... no need to restart tomcat at all.

Hence the problem seems to be something to do with the way Liferay seems to cache/move images which I don't understand.  Perhaps a Liferay expert could explain how this works and once understood I'm sure a workable solution could be found.

I've noticed the same behaviour as you with the images moving to the temp directory under tomcat (in Liferay).  (So if you move the images yourself it will work but that doesn't sound like a good solution to me - it would be better to understand what's going on and maybe get Liferay to move them).

By the way, your configuration settings look fine to me.


One possibility is to get your images from somewhere else... (to workaround the Liferay cache problem)  from Apache Web Server, an image server or even another installation of KonaKart under tomcat.

This allows you to see the images in your storefront in Liferay immediately after they've been uploaded.

You have to set this property to true in your konakart_app.properties file:


For the "Store-Front image base" configuration parameter use something like:


(This one was using KonaKart installed on a different server and the images were loaded through KonaKartAdmin on that)