Remove application name after localhost in jetty

2019-08-06 10:49发布

问题:

I build application using maven and run it using jetty plugin. Lets name of application be AAA, then, how can i configure jetty for entering on my application by URL http://localhost:PORT/ instead of http://localhost:PORT/AAA/ I saw answers when using Tomcat, but i am intresting in jetty.

回答1:

You could set <contextPath> to / in the plugin configuration as documented here or here (based on the version of the plugin used.

<contextPath>/</contextPath>


标签: maven Jetty