Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Iterate over all resources in all jars to serve #255

Merged
merged 1 commit into from
Sep 28, 2022

Conversation

notthetup
Copy link
Collaborator

When adding a resource from to be served from the fjage WebServer, a getClass().getResource(resource) will only find a single resource that is available. So if we do websvr.add("/dashboards", "/dashboards") it will find the first resource in all of the jars with a resource called /dashboards and only serve that.

But it's possible that multiple jars have resources with the same name and that won't get added here. This change iterates through all resources with the given name and adds them to the same path.

@notthetup notthetup self-assigned this Sep 9, 2022
@notthetup notthetup merged commit e2c9b11 into dev Sep 28, 2022
@notthetup notthetup deleted the webserver-multiple-resources branch September 28, 2022 06:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants