How may I serve two assets folder for the same URI in Dropwizard. Currently only the first one is being served, when using the same name for URI.
I'm registering AssetsBundle using (in my main application class):
public void initialize(Bootstrap<DummyFrontendConfiguration> bootstrap) {
bootstrap.addBundle(new AssetsBundle("/assets1", "/public", null, "assets1"));
bootstrap.addBundle(new AssetsBundle("/assets2", "/public", null, "assets2"));
bootstrap.addBundle(new ViewBundle());
}
Css file (main.css) in assets1:
h2{
color: red;
}
Css file (main2.css) in assets2:
h4{
color: green;
}
In html template head:
<link rel="stylesheet" type="text/css" href="public/stylesheets/main.css">
<link rel="stylesheet" type="text/css" href="public/stylesheets/main2.css">
In html template body:
<h2>This should be red</h2>
<h4>This should be green</h4>
Unfortunately the second css file (main2.css) couldn't be loaded during the html page rendering (404 - not found), any ideas?