Get referring servlet

I have a webapp made up of many servlets. Is there a way to retrieve the servlet that linked to the current servlet?IE: My login servlet redirects to my main menu servlet. Is there a way for my main menu servlet to find out if the client was properly redirected from the login
[299 byte] By [bronze-starDukes] at [2007-11-26 12:13:05]
# 1
StringBuffer sb = request.getRequestURL();String s = sb.toString(); //s contains the full URL without parameters wich did the request.Could work.
bronzestar at 2007-7-7 14:13:51 > top of Java-index,Archived Forums,Socket Programming...
# 2

You are looking for the "referer" HTTP header (and yes, it is actually mispelled in the protocol itself).

String referrer = request.getHeader("referer");

The returned value will be null if the url is opened directly in the browser and it will contain the full url of the page that was used to navigate to the current page.

silverstar at 2007-7-7 14:13:51 > top of Java-index,Archived Forums,Socket Programming...