Jetty base resource help
Hey, I have a java app and I'm using jetty server
I used to have this code
context.setBaseResource( Resource.newResource( WebConfigurationProvider.class.getResource( "webapp" ) ) );
But after upgrading to jetty 12, Resource.newResource
isn't available anymore
I replaced it with
This is now causing an exception when the app is built and ran because the resource is in a pkg file
pkg://server-config.pkg/com/mirada/cerberus/config/webapp/
java.nio.file.FileSystemNotFoundException: Provider "pkg" not installed
pkg is actually not in the FileSystemProvider.installedProviders()
hence why this is happening when the path is trying to be fetched
I'm kind of stuck, not sure what to try anymore
I'm not sure if it's a jetty thing or like java thing because the providers are in java.nio.file.spi, I have file, jar and jrt but i don't have pkg, and jetty is not using that it's simply when it tries to do Path.of(uri)7 Replies
⌛
This post has been reserved for your question.
Hey @mind404! Please useTIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here./close
or theClose Post
button above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.
💤
Post marked as dormant
This post has been inactive for over 300 minutes, thus, it has been archived.
If your question was not answered yet, feel free to re-open this post or create a new one.
In case your post is not getting any attention, you can try to use /help ping
.
Warning: abusing this will result in moderative actions taken against you.
💤
Post marked as dormant
This post has been inactive for over 300 minutes, thus, it has been archived.
If your question was not answered yet, feel free to re-open this post or create a new one.
In case your post is not getting any attention, you can try to use /help ping
.
Warning: abusing this will result in moderative actions taken against you.
Still need help
💤
Post marked as dormant
This post has been inactive for over 300 minutes, thus, it has been archived.
If your question was not answered yet, feel free to re-open this post or create a new one.
In case your post is not getting any attention, you can try to use /help ping
.
Warning: abusing this will result in moderative actions taken against you.
Stack Overflow
How can I serve a particular classpath resource at a given address ...
I'm looking to expose a clientacesspolicy.xml file from an embedded jetty server.
My current attempt looks like this:
ContextHandler capHandler = new ContextHandler();
capHandler.setContextPath("/
ResourceFactory (Eclipse Jetty API Doc - v12.0.13)
declaration: package: org.eclipse.jetty.util.resource, interface: ResourceFactory
💤
Post marked as dormant
This post has been inactive for over 300 minutes, thus, it has been archived.
If your question was not answered yet, feel free to re-open this post or create a new one.
In case your post is not getting any attention, you can try to use /help ping
.
Warning: abusing this will result in moderative actions taken against you.