Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] Upgrading from 8.1.8 to 9.1.0

/me takes a deep breath ... :)

The XML configuration files you mentioned ...
   jetty-http.xml and jetty-ssl.xml 

Are provided, out of the box, by the jetty distribution in Jetty 9.1.
You can find them in ${jetty.home}/etc/ directory.

Of note is that we have parameterized all of the configurable values in those XMLs.
You can now set the values using simple properties, either on the command line, or within the ${jetty.base}/start.ini

When you activate the module for http or https, the appropriate libraries, and xml, will automatically be added to start jetty.
Unless you have a highly custom setup (such as listening on 2 different ports, using SSL on each, each with their own keystore and configuration), you really should have no need to be mucking around in XML files anymore.

Now, about the modules:

http -> server
https -> ssl -> server

You can find the details about the modules in ${jetty.home}/modules/

 modules/http.mod

 modules/https.mod

 modules/ssl.mod

 modules/server.mod

Ideally, this level of detail is not important to you.
What is important is that you want to use https and want to configure it.

You accomplish that by adding the --module=https to your start.ini
By default, the module system will keep things sane, and transitively include all dependent modules as well.

While you can manage the list of active modules yourself, by editing the ${jetty.base}/start.ini, we've also made the system a bit more user friendly.

If you want to start using a new module ...

[my-base] $ java -jar ../jetty-distribution-9.1.0.RC0/start.jar --add-to-start=https

That will add the "--module=" lines and associated properties (the parameterized values mentioned above), to your start.ini, which makes configuring things easier.

Notice that your ${jetty.base}/start.ini has no references to the XML files?
That's because all of the xml files, and their load order (important!), is now dictated by the module system and its graph of dependencies.

You can see what the configuration will look like, after all of the modules are resolved, without starting jetty via ...

[my-base] $ java -jar ../jetty-distribution-9.1.0.RC0/start.jar --list-config

Give it a whirl, you'll like it, we promise! :-)


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


On Wed, Oct 9, 2013 at 4:56 AM, John English <john.foreign@xxxxxxxxx> wrote:
On 08/10/2013 17:20, Joakim Erdfelt wrote:
With Jetty 9.1 and onwards, here's what you'll do ...

We'll use the ${jetty.home} and ${jetty.base} concepts to their maximum effect.

Phew! Looks like I've got a bit of a learning curve ahead of me!

But, one more question: It looks like I need at least 2 extra XML config files (jetty-http.xml and jetty-ssl.xml), or can I fold them into jetty.xml the way it used to be?

Many thanks,

--
John English
_______________________________________________
jetty-users mailing list
jetty-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/jetty-users


Back to the top