0

Currently I am specifying the path to a shared image directory in the wicket application as follows:

getSharedResources().add("images", new FolderContentResource(new File(this.getServletContext().getResource("/images").getFile())));

Following path does not work either:

getSharedResources().add("images", new FolderContentResource(new File("/opt/tomcat/webapps/test/images")));

When deploying the application to Jelastic/Tomcat, the images cannot be retrieved. How to fix this?

Chris
  • 89
  • 1
  • 10

1 Answers1

1

According to Jelastic's documentation (http://docs.jelastic.com/environment-variables) user.home /opt/tomcat/temp is your user space. You should put your stuff there. Check this article http://wicketinaction.com/2011/07/wicket-1-5-mounting-resources/ for inspiration how to do it.

Notes: - Jelastic's docu says "environment variables" but "user.home" looks like a system property to me - the folder name is temp, so it may get cleaned by Jelastic in some conditions. Read their documentation to be sure when this may occur.

martin-g
  • 17,243
  • 2
  • 23
  • 35