• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

JAX-RS URL Designators

 
Ranch Hand
Posts: 391
1
MySQL Database PHP Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there a default handler in Root Resource class. Below is the Root resource class


Here is web.xml




I understand that any get request with url pattern /app/top will be handled by call method of the Root resource class and Hello will be printed.

But I was expecting a 404 error for request with URL pattern /app/top/abc or in general /app/top/anything , but it doesn't result in 404 error and no Hello message

I haven't specified any handler for pattern /top/anything , So it should have result in 404 error.
 
Creator of Enthuware JWS+ V6
Posts: 3288
296
Android Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I haven't specified any handler for pattern /top/anything , So it should have result in 404 error.


Yes, I agree, it should. What server are you using?
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!