title: How can I configure the JAX-RS base path in TomEE+?
body: <p>I have a WAR with some JAX-RS services, deployed into TomEE Plus. Given a service annotated with <code>@Path("myservice")</code>, TomEE+ publishes it to <code>localhost:8080/mywebapp/myservice</code>.</p>
  
  <p>However, that also makes accessing a JSP at <code>localhost:8080/mywebapp/index.jsp</code> impossible - JAXRSInInterceptor complains that <code>No root resource matching request path  has been found, Relative Path: /index.jsp</code>.</p>
  
  <p>So I would like to configure a path prefix <code>api</code> to all services, which changes the <code>myservice</code> URL to <code>localhost:8080/mywebapp/api/myservice</code>. Doing so would be trivial if I had configured CXF on my own (with or without Spring), because I could simply change the URL pattern of the CXF Servlet - but I am relying on the default settings where I don't configure anything besides the annotations. So how do I do that in this case?</p>
  
  <p>Note that I don't want to alter the <code>@Path</code> annotations to include the prefix, because that does not fix the issue with the JSP.</p>