You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For example, if there was a request with path /static/css/mystyles.css the static serve will look for a file in the directory webroot/static/css/mystyle.css.
It will also look for a file on the classpath called webroot/static/css/mystyle.css. This means you can package up all your static resources into a jar file (or fatjar) and distribute them like that
The paths in the examples are incorrect.
Given the route spec, /static/* maps to /webroot/*, not/webroot/static/*.
The doco should thus read:
For example, if there was a request with path /static/css/mystyles.css the static serve will look for a file in the directory webroot/css/mystyle.css.
It will also look for a file on the classpath called webroot/css/mystyle.css. This means you can package up all your static resources into a jar file (or fatjar) and distribute them like that
The documentation at http://vertx.io/docs/vertx-
web/kotlin/#_serving_static_resources says:
In the following example all requests to paths starting with /static/
will get served from the directory webroot:
router.route("/static/*").handler(StaticHandler.create())
For example, if there was a request with path /static/css/mystyles.css
the static serve will look for a file in the directory
webroot/static/css/mystyle.css.
It will also look for a file on the classpath called
webroot/static/css/mystyle.css. This means you can package up all your
static resources into a jar file (or fatjar) and distribute them like that
The paths in the examples are incorrect.
Given the route spec, /static/* maps to /webroot/*, *not*
/webroot/static/*.
The doco should thus read:
For example, if there was a request with path /static/css/mystyles.css
the static serve will look for a file in the directory
webroot/css/mystyle.css.
It will also look for a file on the classpath called
webroot/css/mystyle.css. This means you can package up all your static
resources into a jar file (or fatjar) and distribute them like that
Seems to have caused confusion where people have ended missing the point
and just changed the route to match more liberally, e.g. one of the answers
here: http://stackoverflow.com/questions/31778971/vertx-web-
where-do-i-place-webroot-folder#33856640
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#265>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABbltmVLFjWgtvW5V_ScfSrGAXDZdrE-ks5r4cBqgaJpZM4NWsTO>
.
The documentation at http://vertx.io/docs/vertx-web/kotlin/#_serving_static_resources says:
The paths in the examples are incorrect.
Given the route spec,
/static/*
maps to/webroot/*
, not/webroot/static/*
.The doco should thus read:
Seems to have caused confusion where people have ended up missing the point and just changed the route to match more liberally, e.g. one of the answers here: http://stackoverflow.com/questions/31778971/vertx-web-where-do-i-place-webroot-folder#33856640
The text was updated successfully, but these errors were encountered: