If I want to get the url of the page from where the servlet is called, which method should I use? If I use getRequestURL() , it gives the url of the web page I am browsing currently. But I need the previous page url. I want to know from which page the conytrol comes from. Please help. Thanks.