Show Topics
Hide Topics

@QueryParam annotation Example


If the client sends an input in the form of query string in the URL, then those parameters are called as Query Parameters. 



If you observe the above syntax, client passing custNo=100&custName=Satya started after question mark (?) symbol and each parameter is separated by & symbol, those parameters are called as query parameters.



1.Create Dynamic web project in eclipse, convert that into Maven Project



2.Add Jersey jar files manually / through Maven by writing repo details in pom.xml



3.Create RESTFul webservice



4.Configure web.xml



5.Test Webservice directly by using URL / writing webservice client

http://localhost:8080/JAXRS-QueryParam-Example/rest/students?rollno=1218&name=SATYA KAVETI&address=VIJAYAWADA


Download Example Code