This week's book giveaway is in the Performance forum. We're giving away four copies of The Java Performance Companion and have Charlie Hunt, Monica Beckwith, Poonam Parhar, & Bengt Rutisson on-line! See this thread for details.
I need my web-application to be accesses from certian Ip addess.How can i acheive this ?
Thank in advance
J 4 Java
posted 7 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.