This week's book giveaway is in the iOS forum.
We're giving away four copies of Classic Computer Science Problems in Swift and have David Kopec on-line!
See this thread for details.
Win a copy of Classic Computer Science Problems in Swift this week in the iOS forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to restrict access to request from specific IP’s in Java web application?  RSS feed

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How to restrict access to request from specific IP’s in Java web application?
 
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Note that the javax.servlet.ServletRequest interface has a getRemoteAddr method.

Bill

 
cherry hal
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi William Brogden,
Thank you and can you explain with programmatically i mean sample code?
 
Author and ninkuma
Marshal
Posts: 66610
161
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You have enough info to write some code for yourself. Please do so and then post back with any troubles you may be having.
 
Sheriff
Posts: 21308
87
Chrome Eclipse IDE Java Windows
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
One suggestion - use a filter to check the IP address. That way you don't have to build in the same checks in all of your servlets.
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

cherry hal wrote:Hi William Brogden,
Thank you and can you explain with programmatically i mean sample code?



If you are aspiring to be a servlet/jsp developer, you will learn more by coding than by asking for worked out code.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!