Show Topics
Hide Topics

@MatrixParam annotation Example

 

http://localhost:8001/…/rest/customers;custNo=100;custName=Satya

Matrix parameters are another way defining the parameters to be added to URL.  If you observe the above syntax, client is passing two parameters each are separated by semicolon(;), these parameters are called as matrix parameters.  Remember these parameters may appear anywhere in the path

 

 

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-MatrixParam-Example/rest/students;rollno=1118;name=SATYA%20KAVETI;address=VIJAYAWADA

 

Download Example Code