Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] Spring Boot executable jar with embedded Jetty?

That description seems like it would be the old double nested uncompress issue.

We rely on Java to handle the "jar:file:/path/to/app.jar!/path/to/internal/resource.txt" decompression of content from an archive.
However, Java doesn't handle double-nested (or deep nested) archives.

Such as .. jar:file:/tmp/app.jar!/lib/resource.jar!/META-INF/resources/content.html

Note that there are two "!/" entries in that URI

Not sure how Tomcat handles it...
I could imaging you'd either have to replace the "jar" protocol handling with something custom...
or decompress the content first to a temp directory for it to work (which is how we do it for standard distribution and standard war files)


Joakim Erdfelt / joakim@xxxxxxxxxxx

On Fri, Mar 25, 2016 at 2:53 PM, Bjørn T Johansen <btj@xxxxxxxxxx> wrote:
I am trying to use Jetty instead of Tomcat as my embededded application server in my Spring Boot projects but I have a problem. (I tought it was
working but I as fooled my IntelliJ IDEA, the jar file built by gradle does not work...)

Jetty does not see my web root folder. So I get an 404 error when trying to access my html files..
In Tomcat, I have a my web content inside /META-INF/resources/ inside my jar file but that does not work when using Jetty. I have alse tried to put
my webcontent inside /static/ and /webapp/ but Jetty still does not see any html files.

What am I missing?


Regards,

BTJ

--
-----------------------------------------------------------------------------------------------
Bjørn T Johansen

btj@xxxxxxxxxx
-----------------------------------------------------------------------------------------------
Someone wrote:
"I understand that if you play a Windows CD backwards you hear strange Satanic messages"
To which someone replied:
"It's even worse than that; play it forwards and it installs Windows"
-----------------------------------------------------------------------------------------------
_______________________________________________
jetty-users mailing list
jetty-users@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users


Back to the top