java - Jersey web.xml file <init-param> -
i new rest services using jersey.
my project entitled: cs9322.simple.rest.books.resources
i have question regarding web.xml file contains next parts:
<init-param> <param-name>com.sun.jersey.config.property.packages</param-name> <param-value>cs9322.simple.rest.books.resources</param-value> </init-param> <servlet-mapping> <servlet-name>jersey rest service</servlet-name> <url-pattern>/rest/*</url-pattern> </servlet-mapping> i find if change:
<param-value>cs9322.simple.rest.books.resources</param-value> to
<param-value>cs9322.simple.rest.books</param-value> i still have access service through url: cs9322.simple.rest.books.resources/rest/*
i don't understand <param-value>cs9322.simple.rest.books.resources</param-value> refers exactly, because seems base url service project name , isn't influenced <param-value>.
could please explain me <param-value> refers to?
thank help.
<param-value>cs9322.simple.rest.books.resources</param-value>
or
<param-value>cs9322.simple.rest.books</param-value> has no relation rest service url. above parameter used scan files exposed rest services bailiwick of jersey framework.
it name of project/web context used when accessing rest service url. web context seems cs9322.simple.rest.books.resources , hence have utilize base of operations url.
java rest jersey web.xml
No comments:
Post a Comment