-2

I want to pass the parameters after the URL with using 'forward slash(/). For example:{myURL.com}/{123}/{"test"}. Here 'Name' and 'Id' are the parameters.

I know how to pass the parameters like {myURL.com}?{Id=123}?{Name="test"}.

halfer
  • 19,824
  • 17
  • 99
  • 186
RKCY
  • 4,095
  • 14
  • 61
  • 97
  • what about if you concatenate that? – Khalil M Oct 05 '17 at 00:15
  • @KhalilM : not sure how to concatenate the parameters in the URL. do you have any sample code on this? – RKCY Oct 05 '17 at 00:17
  • @BalusC :- This is not the exact duplicate question what you have mentioned. I want to implement based on the url parameters not mapped in the web.xml file. Hope you understand. – RKCY Oct 06 '17 at 03:01
  • I found the solution in Spring MVC. If i use the @PathVariable i can pass the parameters in the url with /{id} and /{id}/{name}. – RKCY Oct 06 '17 at 03:03

1 Answers1

-1

To pass variables in the URL, start with ? and separate each variable with &

myURL.com/servlet?name=cool&id=666&colour=blue
Jonathan Laliberte
  • 2,672
  • 4
  • 19
  • 44