Hi

What about API documentation javax.servlet.ServletRequest method
getRemoteAddr()

This is from documentation:

public java.lang.String getRemoteAddr()
Returns the Internet Protocol (IP)
address of the client that sent the request. For HTTP servlets, same as the
value of the CGI variable REMOTE_ADDR.
Returns:
a String containing the IP address of the client that sent the request

RTFM :-)

Denis


-----Original Message-----
From: A mailing list for discussion about Sun Microsystem's Java Servlet API
Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of Serdar BOZDAG
Sent: Monday, July 22, 2002 10:22 AM
To: [EMAIL PROTECTED]
Subject: can servlet know servers' ip?


hi,
i call a servlet at http://www.asdfg.com/servlet/helloWorld....

this servlet need to know the ip of the server (http://www.asdfg.com)
because there is a form in the servlet and in action this servlet is used
again.
so i need
<FORM Action=" + ipOfTheServer + "/servlet/helloWorld">.
could you help pls?

thanks in advance,
serdar

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to