How to configured the JAX-RS applications?

DWQA QuestionsCategory: Web Design HTMLHow to configured the JAX-RS applications?
Editor Staff asked 1 month ago

How to configured the JAX-RS applications?

1 Answers
Editor Staff answered 1 month ago

JAX-RS applications have the root resource classes packaged in a war file. There are 2 means of configuring JAX-RS applications.

  1. Use @ApplicationPath annotation in a subclass of javax.ws.rs.core.Application that is packaged in the WAR file.
  2. Use the <servlet-mapping> tag inside the web.xml of the WAR. web.xml is the deployment descriptor of the application where the mappings to the servlets can be defined.