Hi,

On Mon, Jan 27, 2020 at 5:49 AM Josh Spiegel <[email protected]> wrote:
>
> Hi Simone,
>
> Thank you for the suggestion.  I tried it but it didn't work because 
> getServer() returns null at the time the WebAppContext instance is configured.
>
> Instead, I tried a slight variation on your idea.  I added the connector and 
> the WebAppContext handler explicitly to the server calling setHandler (see 
> below).  Do you think this is a reasonable way to do it?

It is a reasonable way, although it kind of hardcodes a number of
things into the same XML.
You typically want to configure server-related things into XML that
are enabled by modules, and context-related things into context XMLs.

Perhaps a better way to do this would be to put "myContext" and the
connector configuration into one XML enabled by a module,
and have a $JETTY_BASE/webapps/mywar.xml context XML that configures
the WebAppContext.

-- 
Simone Bordet
----
http://cometd.org
http://webtide.com
Developer advice, training, services and support
from the Jetty & CometD experts.
_______________________________________________
jetty-users mailing list
[email protected]
To change your delivery options, retrieve your password, or unsubscribe from 
this list, visit
https://www.eclipse.org/mailman/listinfo/jetty-users

Reply via email to