• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JAX-RS URL Designators

 
Mahtab Alam
Ranch Hand
Posts: 391
1
Java MySQL Database PHP
  • 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.
 
Frits Walraven
Creator of Enthuware JWS+ V6
Saloon Keeper
Pie
Posts: 2536
113
Android Chrome Eclipse IDE
  • 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?
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic