0

I am using JAX-RS to develop a RESTful api for an application. I'm deploying it in Tomcat. It's deployed at myhost:8080/api. Resources are at .../api/{resourceName}, etc.

I'd like to have it so that people who visit /api see our html based api documentation. I'm wonder what the best solution is. Specifying a welcome file in the web.xml does not seem to work, but that would be nice and simple.

Alternatively, If I create a resource and set the path to "/" then, I could programmatically serve up content. That's a little inflexible, because it's then in code, but I could make it work.

Lastly I thinkI can use Apache to direct traffic to where I want. Not a guru on Apache, but this may be the most flexible solution.

Which of these alternatives would be better? Any option I am missing?

Ryan
  • 288
  • 3
  • 11

1 Answers1

0

I found my answer here: How to mix server-side Jax-rs call with native files without prefix?

Register as a filter instead of a servlet, set forward on 404 param.

Community
  • 1
  • 1
Ryan
  • 288
  • 3
  • 11