getting clients ip

hi,i'm programming a web page with servlets and i would like to know how can i get the ip from the users that connect to the webpage from a java code.It also would be useful to be able to send a variable from a page to an appletthanks
[263 byte] By [mandosa] at [2007-11-27 5:14:23]
# 1
You could use one of the following methods:request.getRemoteAddr()request.getRemoteHost()
daniel_86a at 2007-7-12 10:36:20 > top of Java-index,Java Essentials,Java Programming...
# 2
ServletRequest.getRemoteAddr();Also check this out http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/http/HttpServlet.html
jawadhashmia at 2007-7-12 10:36:20 > top of Java-index,Java Essentials,Java Programming...