Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] WebAppContent not being extract to temp directory

Most EXE processes are merely launchers for java and your app.
Nothing really changes as far as the jars / classes etc.
They are usually left, in-tact.

Since this is being launched on windows, via an EXE, I would start to look at permissions that your EXE has.
It might not have the rights to do what you think it should be able to do. (look at the rights of the application/exe on windows for this)

Also look into any sort of java SecurityManager that is applied to your running application. (some launchers apply custom SecurityManager configurations)

Out of curiosity, are there files in your instead?

Joakim Erdfelt <joakim@xxxxxxxxxxx>
Expert advice, services and support from from the Jetty & CometD experts

On Thu, Oct 2, 2014 at 3:37 PM, William Ferguson <william.ferguson@xxxxxxxxxxxxx> wrote:
I have a webapp that is packaged as a WAR but for which I have a main application class that creates an embedded Jetty instance to serve the WAR. All works well.
When the app starts Jetty extracts the WebApp content into the WebAppContext#tempDirectory and Jetty serves all resources.

But I am trying to package the WAR as an EXE using launch4J and am running into a problem. Launch4J creates the EXE, the EXE starts and my main class starts the Jetty server. But while the WebAppContext#tempDirectory is being correctly set, the contents of the WebApp are not being extracted into it.

Jetty does create the tempDirectory with a webapp child folder, but that child folder is empty. This means that Jetty returns 404 for everything.

NB the EXE that is generated by Launch4J is a valid archive and can be opened as such by WinZip etc.

So my question is, what is responsible within Jetty for extracting the webapp content?
What might be causing it to not extract from an application.exe archive vs an application.war archive?
What can be done to make it extract the content when repackaged as EXE?

This is on Jetty 9.1.1.v20140108


jetty-users mailing list
To change your delivery options, retrieve your password, or unsubscribe from this list, visit

Back to the top