users@jersey.java.net

[Jersey] Optional path parameter at the beginning

From: Arun PV <arun_at_orbyo.com>
Date: Mon, 09 Mar 2015 20:42:52 +0530

Hi,

I'm developing a REST service API. Got stuck when tried the following method in the path parameter


@Path("/{ver : (ver/)?}{param1}/{param2}")The first parameter is optional, it's version number.This works if I try with no version no, like http://www.orbyo.com/services/param1/param2 However it's not working if version parameter has a value, like http://www.orbyo.com/services/0.0.1/param1/param2 (where http://www.orbyo.com/services is the base url ).Need help. Any idea why?Thanks in advance.Regards,Arun