router.route("/static/*").handler(StaticHandler.create(""))
public interface StaticHandler extends Handler<RoutingContext> {
String DEFAULT_WEB_ROOT = "webroot";
I think you will need a custom static handler. which loads the static resources from the classpath then.
using getResource to find the file
http://stackoverflow.com/questions/1900154/classpath-resource-within-jar
Thank you for your answer, Patrick, but unfortunately I can't move these resources to any other directory into JAR, because this JAR is not mine, and I retrieve it from remote maven repository. Now I'm using maven-dependency-plugin to unpack the resources and put them into webroot directory in my JAR, but I'm sure there should be more proper way to serve resources from a root of a JAR.
--
You received this message because you are subscribed to a topic in the Google Groups "vert.x" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/vertx/j1AdluZ-Dnk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to vertx+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/vertx.
To view this discussion on the web, visit https://groups.google.com/d/msgid/vertx/8ca2bdeb-63d2-45ce-955b-438708a49bea%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.