Search Interview Questions | ![]() ![]() Click here and help us by providing the answer. ![]() Click Correct / Improve and please let us know. |
|
| ||||
Web Service - Interview Questions and Answers for 'Get service' - 2 question(s) found - Order By Rating | ||||
| ||||
Ans. No, it's optional as the name of path param required is same as method param name in this case. Even the declaration as following should work - @Path("/{employeeId}") public String employeeInfo(@PathParam Long employeeId){ } | ||||
![]() | ||||
![]() ![]() ![]() | ||||
![]() | ||||
![]() | ||||
![]() | ||||
| ||||
Ans. If the number of params is quite large , I would prefer to either split it with majority of it in query params or all in query params. If the params are all mandatory , I would keep it as path params. If it's optional , I would keep it as query param so as to keep consistent base url. If we don't require the param name , then they can be kept as path params as query params necessitates the usage of param name. | ||||
![]() | ||||
![]() ![]() ![]() | ||||
![]() | ||||
![]() http://javasearch.buggybread.com/InterviewQuestions/questionSearch.php?searchOption=label&keyword=url What is protocol , domain , path and query param ? | ||||
![]() | ||||