Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Reloading the static files in Spark/Jetty-server

I have a bit similar problem described here:

Refresh static files served by SparkJava

In my application user can upload the content to one folder that is also served to user with

Spark.staticFileLocation("/public");

feature. I've understood that SparkJava is reading the 'static' content from that folder only once at startup and it is not aware of changes there. Is it possible to ask Spark (or Jetty via Spark) to reload the changes in static folder?

like image 271
samu Avatar asked Dec 18 '15 15:12

samu


1 Answers

Move to externalStaticFileLocation("/var/www/public");

like image 144
dom farr Avatar answered Sep 19 '22 15:09

dom farr