static-content

How to do static content in Rails?

落爺英雄遲暮 提交于 2019-11-26 11:49:47
问题 Looking at different options: One is to just put the static pages in the public/ folder, but I do want the header from layout/application to be consistent. I tried this, but I got an error: # in routes.rb: map.connect \'*path\', :controller => \'content\', :action => \'show\' # in content_controller.rb: def show render :action => params[:path].join(\'/\') end All I want is an easy way to put together things like my faq, contact, tos, privacy, and other non-application type pages somewhere

How do I use Spring Boot to serve static content located in Dropbox folder?

生来就可爱ヽ(ⅴ<●) 提交于 2019-11-26 08:48:24
问题 I have a Spring Boot web application, and I would like to serve static content located in a shared Dropbox directory on my Linode VPS (~/Dropbox/images). I\'ve read that Spring Boot will automatically serve static content from \"classpath:/META-INF/resources/\", \"classpath:/resources/\", \"classpath:/static/\", \"classpath:/public/\", but of course my Dropbox directory is not on the classpath. Although I could configure Apache to serve the images in my Dropbox folder, I would like to take

Simplest way to serve static data from outside the application server in a Java web application

杀马特。学长 韩版系。学妹 提交于 2019-11-25 21:49:55
问题 I have a Java web application running on Tomcat. I want to load static images that will be shown both on the Web UI and in PDF files generated by the application. Also new images will be added and saved by uploading via the Web UI. It\'s not a problem to do this by having the static data stored within the the web container but storing and loading them from outside the web container is giving me headache. I\'d prefer not to use a separate web server like Apache for serving the static data at