Usually, in a Servlet we write, for example, http://test.com/cust.do?no=1, to get details reg. say, customer no. 1. But recently I came across a URL written as http://localhost:8080/rest/customer/1.txt, which works perfectly well and the servlet returns the first record. My doubt is how the getParameter will return the value.
How to do the parsing, because the servlet gives 404 error, when 1.txt is added to the URL. Really getting stumped, after having worked with regular URL handling with getParameter etc.