JAX-RS Application on the root context - how can it be done?

前端 未结 5 1848
南旧
南旧 2020-12-04 16:39

I would like to have my JAX-RX Application start at the root context so my URLs will be

http://example.com/restfullPath

and not

http://example.com

5条回答
  •  醉梦人生
    2020-12-04 17:30

    You can try to look for DefaultServlet of your servlet container and add servlet-mapping for it by hands in web.xml to handle page files such as *.html, *.jsp or any other.

    E.g. for Tomcat 5.5 it's described here: http://tomcat.apache.org/tomcat-5.5-doc/default-servlet.html.

提交回复
热议问题