aspose file tools*
The moose likes Servlets and the fly likes Security For my web-application Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Security For my web-application" Watch "Security For my web-application" New topic
Author

Security For my web-application

Sarath Koiloth Ramath
Ranch Hand

Joined: May 07, 2008
Posts: 52
Hi Friends,

I need my web-application to be accesses from certian Ip addess.How can i acheive this ?

Thank in advance



J 4 Java
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39576
    
  27
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.


Ping & DNS - updated with new look and Ping home screen widget
Pat Farrell
Rancher

Joined: Aug 11, 2007
Posts: 4639
    
    5

Of course, IP addresses are fairly easy to spoof, so if you want real security, you can't rely on the client's TCP/IP address.
 
wood burning stoves
 
subject: Security For my web-application
 
Similar Threads
Need a good website or book which walks me through developing a J2EE Web Application
how do I deploy/run two web apps in one jboss6 Application Server
How to increase number of parellel ajax hits from same user!!
security sandbox error while accessing applet from client machine.
stop synchronous web service call