This content has been marked as final. Show 2 replies
It is not a parameter. Parameters comes after the question mark. It is actually part of the url. Without knowing details, most likely facebook works on a REST interface (Google that).
A really simple trick to do it with a basic servlet is to map a servlet to a specific pattern, such as /profiles/*. Then when you type in the url somewebsite.com/profiles/harry or somewebsite.com/profiles/bill, the single servlet will be invoked for both urls. In your servlet you can then investigate the url to see which name was added to the back of the url.
Another trick (I'd venture towards a hack really) to use is to not configure a specific servlet but use the error handling built into the system. If the url cannot be found a 404 will be generated, for which you can configure an error handler in the web.xml to redirect to and from there do the trick of investigating the url to get the name.