Jetty plugin not serving resources
See original GitHub issueThe Jetty plugin when executing mvn jetty:run
by default only serves src/main/webapp
(also it seems ${project.output.directory}/webapp-tmp
) as static resources.
The app theme files are copied only ${project.build.outputDirectory}/META-INF/resources
which is served as per the Servlet 3.0 specification.
A fix for running jetty should be found other than requiring adding the plugin configuration
<webApp>
<resourceBases>
<resourceBase>${project.build.outputDirectory}/META-INF/resources</resourceBase>
</resourceBases>
</webApp>
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
how to public static content with jetty-maven-plugin?
So, the question is: How I can expose static content with Jetty? It is not necessary to tell me how to do it...
Read more >Jetty10 Programming Guide | The Eclipse Foundation
This section will look at Jetty's HttpClient non-blocking, asynchronous APIs that are perfectly suited for large content downloads, for parallel ...
Read more >Deploying Web Applications in Jetty - Baeldung
Open the Run menu and click the Edit Configurations options. In the panel on the left search for Jetty Server, if it is...
Read more >Configuring the Jetty Maven Plugin - xy2401.github.io
The classpath of the running Jetty instance and its deployed webapp are managed by Maven, and may not be exactly what you expect....
Read more >Serving static resources in Javalin running as servlets
Javalin-standalone, which is used for deployment to application servers, does not support serving static files as this is a jetty feature and ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I guess the best way to go is to have the static files go to
VAADIN/static
and serve them from there by ourselves as then we do not need to care about jar vs war.Reopened to figure out how we can get any resources from the theme folder to work with using an url with path
"/theme/my-theme/something.png"
from Java or CSS regardless of the app packaging or used server. Currently it is possible to use relative paths in css and this part is handled by webpack and will work even after this copying.Lets use #9535 for the implementation.