I recently started a new job that requires me to write dynamic website with JSP. Previously, I had been designing websites with PHP. I'm in the process of writing my first JSP site, and I'm stuck. I need to know some information about the end user - namely, the URL by which they have accessed a certain page. I know that in PHP, I could have used the $_SERVER superglobal. I've googled the topic and come up with irrelevant information.

How exactly can I determine the URL (server name, file path) with JSP?)