{"action":"created","issue":{"url":"https://api.github.com/repos/eclipse/jetty.project/issues/518","repository_url":"https://api.github.com/repos/eclipse/jetty.project","labels_url":"https://api.github.com/repos/eclipse/jetty.project/issues/518/labels{/name}","comments_url":"https://api.github.com/repos/eclipse/jetty.project/issues/518/comments","events_url":"https://api.github.com/repos/eclipse/jetty.project/issues/518/events","html_url":"https://github.com/eclipse/jetty.project/issues/518","id":148837117,"number":518,"title":"JarFileResource#exists() does not work in spring-boot","user":{"login":"tsachev","id":142505,"avatar_url":"https://avatars.githubusercontent.com/u/142505?v=3","gravatar_id":"","url":"https://api.github.com/users/tsachev","html_url":"https://github.com/tsachev","followers_url":"https://api.github.com/users/tsachev/followers","following_url":"https://api.github.com/users/tsachev/following{/other_user}","gists_url":"https://api.github.com/users/tsachev/gists{/gist_id}","starred_url":"https://api.github.com/users/tsachev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tsachev/subscriptions","organizations_url":"https://api.github.com/users/tsachev/orgs","repos_url":"https://api.github.com/users/tsachev/repos","events_url":"https://api.github.com/users/tsachev/events{/privacy}","received_events_url":"https://api.github.com/users/tsachev/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-04-16T09:32:00Z","updated_at":"2016-04-18T07:22:58Z","closed_at":null,"body":"When spring boot application is started from a fat jar/war keystore resources from\r\nclasspath may have following form\r\n\r\njar:file:/home/tsachev/nemesis/demos/conf-constr/target/demo-0.0.1-SNAPSHOT-boot.jar!/BOOT-INF/classes!/keystore.p12\r\nor\r\njar:file:/home/tsachev/nemesis/demos/conf-constr/target/demo-0.0.1-SNAPSHOT-boot.war!/WEB-INF/classes!/keystore.p12\r\n\r\nThis worked with jetty 9.2 because only get input stream is called for keystore resources,\r\nbut in jetty 9.3 `exists()` is called first  and it returns false, even though\r\n`getInputStream()` works correctly.\r\n\r\nLooking at the source code of `JarFileResource` I found that if this line\r\nhttps://github.com/eclipse/jetty.project/blob/master/jetty-util/src/main/java/org/eclipse/jetty/util/resource/JarFileResource.java#L124\r\nis changed from\r\n```java\r\nint sep = _urlString.indexOf(\"!/\");\r\n```\r\nto\r\n```java\r\nint sep = _urlString.lastIndexOf(\"!/\");\r\n```\r\nit works as expected.\r\n\r\nDo you think this is reasonable to change?"},"comment":{"url":"https://api.github.com/repos/eclipse/jetty.project/issues/comments/211241142","html_url":"https://github.com/eclipse/jetty.project/issues/518#issuecomment-211241142","issue_url":"https://api.github.com/repos/eclipse/jetty.project/issues/518","id":211241142,"user":{"login":"tsachev","id":142505,"avatar_url":"https://avatars.githubusercontent.com/u/142505?v=3","gravatar_id":"","url":"https://api.github.com/users/tsachev","html_url":"https://github.com/tsachev","followers_url":"https://api.github.com/users/tsachev/followers","following_url":"https://api.github.com/users/tsachev/following{/other_user}","gists_url":"https://api.github.com/users/tsachev/gists{/gist_id}","starred_url":"https://api.github.com/users/tsachev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tsachev/subscriptions","organizations_url":"https://api.github.com/users/tsachev/orgs","repos_url":"https://api.github.com/users/tsachev/repos","events_url":"https://api.github.com/users/tsachev/events{/privacy}","received_events_url":"https://api.github.com/users/tsachev/received_events","type":"User","site_admin":false},"created_at":"2016-04-18T07:22:58Z","updated_at":"2016-04-18T07:22:58Z","body":"The `WEB-INF/classes` actually references to the nested jar with application code. It is however not really in actual nested jar. I suspect that this way they avoid confusion (an archive which contains another   archive with the same name) and also ensure that application classes will be the first in their class loader."}}