I installed Jetty9 on Ubuntu 18.04 using the distro about 6 months ago. I'm 
kind of regretting it now. It seems to be rarely updated and poorly documented. 
I had to do a fair amount of digging to find where things are located.

Your situation may differ but here is where things ended up for me:

JETTY_HOME = /usr/share/jetty9 
 
 I found this by inspecting the "systemd" file that was installed, at 
/lib/systemd/system/jetty9.service

For configuration, /etc/jetty9 holds the /start.d directory, and 
/ext/default/jetty9 has a copy of start.ini file.

As for where to put the war file, (e.g., JETTY_BASE) that seems to be within 
/var/lib/jetty9/webapps/ or .../webapps/root. The latter is were I put my 
static website (index.htm file). There is a README.TXT at 
/var/lib/jetty9/webapps with some instructions for handling of the war file. 
The start.d for your war would also be placed in this area.

I hope this is actually helpful and that I understood and addressed your 
question. I am not exactly confident in my understanding of Jetty deployment 
and was very frustrated with the extent to which the official documentation 
diverged from the distro install.

 
-----Original Message-----
From: Joakim Erdfelt <[email protected]>
To: JETTY user mailing list <[email protected]>
Sent: Mon, Jun 22, 2020 4:33 pm
Subject: Re: [jetty-users] path to deploy a WAR

You have separate directories.
One for ${jetty.home} (sometimes referred to as $JETTY_HOME) - this is your 
unpacked `jetty-home` archive/tarball (or the older `jetty-distribution` 
archive/tarball) - leave this directory alone, don't edit it, don't change it, 
don't add things, don't delete things.  Generally speaking treat this directory 
as read-only.
Then you have the ${jetty.base} directory, this is your specific instance 
configuration.The ${jetty.base} directory is not the same directory as 
${jetty.home}.The ${jetty.base} directory is not contained within the 
${jetty.home} directory.The ${jetty.base} directory does not contain the 
${jetty.home} directory.
This is documented at 
https://www.eclipse.org/jetty/documentation/current/quick-start-configure.html#quickstart-config-how
But a general/quick example (in shell speak) is ...
$ mkdir /path/to/myjettybase$ cd /path/to/myjettybase# Configure it$ java -jar 
/path/to/jetty-home/start.jar --add-to-start=http,deploy,annotations$ cp 
/tmp/myapp.war /path/to/myjettybase/webapps/
# Show what the configuration looks like$ cd /path/to/myjettybase$ java -jar 
/path/to/jetty-home/start.jar --list-config

# Start Jetty$ cd /path/to/myjettybase$ java -jar /path/to/jetty-home/start.jar
Joakim Erdfelt / [email protected]

On Mon, Jun 22, 2020 at 6:04 PM Nicholas <[email protected]> wrote:

How do I deploy a WAR file by copying it to a directory?

https://unix.stackexchange.com/q/594288/101935


Basically it boils down to this:  where is the JETTY_HOME directory?  It 
varies from distro to distoro, sure.  When I asked on Ubuntu IRC the 
response was that Jetty isn't well documented. Perhaps it's well 
documented, but I for one cannot figure out where the directory is, either.


I can see some directories relating to this:

https://pastebin.com/PR4mWpMd


perhaps Ubuntu should document JETTY_HOME, but they don't -- that I 
could find.  So, I'm asking here.




thanks,


Nick

_______________________________________________
jetty-users mailing list
[email protected]
To unsubscribe from this list, visit 
https://www.eclipse.org/mailman/listinfo/jetty-users

_______________________________________________
jetty-users mailing list
[email protected]
To unsubscribe from this list, visit 
https://www.eclipse.org/mailman/listinfo/jetty-users
_______________________________________________
jetty-users mailing list
[email protected]
To unsubscribe from this list, visit 
https://www.eclipse.org/mailman/listinfo/jetty-users

Reply via email to