I need my web-application to be accesses from certian Ip addess.How can i acheive this ?
Thank in advance
J 4 Java
posted 8 years ago
HttpServletRequest.getRemoteAddr returns the IP address from where the request originates. You can compare that with the list of approved addresses, and return an error (maybe 403 - SC_FORBIDDEN) if it's not in that list.