tomcat jersey retrieve full context path

I’m implementing ApplicationEventListener, I need to retrieve the context path, the one declared in my web.xml:


I’m implementing onEvent method

public void onEvent(ApplicationEvent event) {
    if (event.getType() == ApplicationEvent.Type.INITIALIZATION_FINISHED) {
        final ResourceModel resourceModel = event.getResourceModel();           

I can also use @Context ServletContext servletContext in ResourceConfig to pass the info if necessary but I don’t know how to reach this.

From a servlet using HttpServletRequest, it’s possible to call request.getContextPath(), but obviously I can’t use HttpServletRequest.