Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] Virtual Host configuration

On 26/06/2020 05:06, philfrei@xxxxxxx wrote:
I can get the browser to display the desired content by adding /hexara or /adonax to any of the four urls. But I'm hoping to eventually get to where the browser address bar displays the url and the browser screen shows the index.htm for that domain, with no need to add the /hexara or /adonax.

This is controlled by the contextPath setting - when on a single hostname it's necessary to distinguish different contexts with a prefix, but when the hostname decides the context it's rarely needed.

Either set contextPath to / or just remove that setting entirely.

I was inspecting WebAppContext and didn't see a reference to a method setResourcePath in the api, but did spot setResourceBase in a parent class ContextHandler. On the chance the terms "path" and "base" were accidentally mixed up, I tested using <Set name="resourceBase">

Yep, it definitely should have been resourceBase not resourcePath, sorry for confusion. :(

Next time I'll make sure to copy from a working config instead of re-typing stuff.

Back to the top