java - JAX-RS web.xml deployment -


using jax-rs aware container, example app server weblogic, what's difference in configuring jax-rs capabilities in web.xml way:

<servlet>         <servlet-name>restservlet</servlet-name>         <servlet-class>com.sun.jersey.spi.container.servlet.servletcontainer</servlet-class>         <init-param>             <param-name>com.sun.jersey.config.property.packages</param-name>             <param-value>                 myapp.server,                 myapp.server.boundaries             </param-value>         </init-param>         <init-param>             <param-name>com.sun.jersey.api.json.pojomappingfeature</param-name>             <param-value>true</param-value>         </init-param>     </servlet>     <servlet-mapping>         <servlet-name>restservlet</servlet-name>         <url-pattern>/resources/*</url-pattern>     </servlet-mapping> 

and using application.java

@applicationpath("/resources") public class shoppingapplication extends application {    // complete } 


Comments

Popular posts from this blog

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -