Java - Request Param vs Path Variable

Request Param:

  • Extract query parameter
  • Used in web application mostly
Eg: http://localhost:8080/portal/book?id=123

Path Variable:
  • Extract data right from the URI
  • Used in REST webservices
Eg: http://localhost:8080/portal/book/123

Comments

Popular posts from this blog

How to set Java Object into JaxBElement ?

GitLab