Help with WADL Auto Generation in Jersey

As described here: http://wikis.sun.com/display/Jersey/WADL

I am using Jersey 1.4 in Tomcat 6.

I tried every possible URI with "/application.wadl", and all I get is 404 (not available). I obviously don’t understand anything, but every blog I read makes it sound like it's out of the box. I am using Tomcat 6..can this make a difference?

I was able to use the Pavel example using the WadlResource object here, but it seems to me that I do not need to do this: http://markmail.org/message/lbeaw5vyr4qergdd#query:+page:1+mid:fo4dt7tbd6rb3gvi+state:results

thanks.

+4
source share
4 answers

I think ChrisO most likely has the answer that your wadl will be available at http: // localhost : {port} / {warname} /application.wadl

+4
source

I had the same problem and it turned out that default.wadl by default only works when configured in the root directory of the application

My conf included several url patterns like the following

<filter-mapping> <filter-name>jersey-spring</filter-name> <url-pattern>/admin/rest/*</url-pattern> </filter-mapping> 

And I had to add this to make it work:

  <filter-mapping> <filter-name>jersey-spring</filter-name> <url-pattern>/application.wadl</url-pattern> </filter-mapping> 

Hope this helps

+3
source

If you use Jersey, WADL will be automatically passed at application.wadl suffix to your URL.

Here everything / rest / is & lt; url-pattern> for <servlet-mapping>

  http: // yourmacine: 8080 / RESTfulExample / rest / application.wadl 
+2
source

You need to specify the display name and url-display pattern of sevlet (if any) before application.wadl

0
source

Source: https://habr.com/ru/post/1340391/


All Articles