You can use:
    request.getHeader("Referer");
to return the referring page.

Or, we have a class that takes a request object and performs methods against it.
One thing that it does is return the referring page. (without the query string or 
path).
This is the method from it....

m_request is a member variable of the class...

   public String getReferrer()
   {
       String sFullRef, sRefPlus, sReferer;

       sFullRef = m_request.getHeader("Referer");
       if(sFullRef == null) return "";

       int iPos = sFullRef.lastIndexOf("/");
       if(iPos >= 0) {
         sRefPlus = sFullRef.substring(iPos+1, sFullRef.length());
       }
       else {
         sRefPlus = sFullRef.substring(0, sFullRef.length());
       }

       iPos = sRefPlus.indexOf("?");
       if(iPos >= 0) {
         sReferer = sRefPlus.substring(0, iPos);
       }
       else {
         sReferer = sRefPlus;
       }

       return sReferer;
   } // ends getReferer()

HTH,
    Pete


Kishore Subramanian wrote:

> Hi,
>
> Is there a way for an Action class to find out which page/action called it ?
> Iam faced with a problem where the Action class should perform its work and forward 
>the page back to callee page.
>
> Note - I cannot add any "forward" tags to this Action mapping because this Action is 
>part of a framework.
>
> Any clues ?
>
> Thanks,
> Kishore
begin:vcard 
n:;
x-mozilla-html:FALSE
org:<BR><IMG SRC="http://www.irista.com/logo/irista.gif"><BR><BR><FONT Color=#000080><FONT SIZE=2><B>Bringing Vision to Your Supply Chain
adr:;;;;;;
version:2.1
end:vcard

Reply via email to