hi charles,

for your own pages, it's not that difficult to track down the 'calling
page'.
you simply have to attach the name of the calling page at the end of your
link, for example

[page1.jsp]
<a href="page2.jsp?callingpage=page1">

and then read it from the request object like you did before

[page2.jsp]
request.getParameter("callingpage");

there might be more sophisticated ways doing that but i am positive that
this works.


ohh, charles wait. there is a better way. i have just checked the javadocs.
try this:

String callingpage = new Sting();
callingpage = request.getRemoteAddr();

the method should return the IP adress of the client as a string.

good luck,

iNGo.



-----Urspr�ngliche Nachricht-----
Von: A mailing list about Java Server Pages specification and reference
[mailto:[EMAIL PROTECTED]]Im Auftrag von Charles Luo
Gesendet: Freitag, 4. Mai 2001 17:34
An: [EMAIL PROTECTED]
Betreff: get the calling URL


hi, all,

I am wondering how I can get the calling URL.

Let's say, I got two pages:  /test1/foo/page1.jsp. In the page1.jsp,I have a
link to /test2/foo/page2.jsp. Now when I run page2, I want to get the value
of URL for page2.jsp, i.e. /test1/foo/page1.jsp .

I've tried to use hidden field and then to use
request.getParameter("hiddenfieldname");

Out of luck, I couldn't get the value.

BTW, I am using WEbLogic Commerce Server 3.2

Any suggestions would be appreciated.

cheers
~~~~~~~~~~~~~~~~~~~~~~~~~~
Charles Luo

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to