Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

encryption of data shown in the address bar

 
nelson christos
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how can i restrict an user from entering the data directly into the address bar by keying in the numbers and going to the specific resource even if he is not allowed to
is there anyway of encrypting it so that he cannot get the numbers itself
 
pradheesh manohar
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi nelson you must be implementing Filter interface for this
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can't stop a user from typing an address in the browser's address field.
Also if it were encrypted, the browser wouldn't be able to find your site.

If you put your content behind a directory that can't by viewed directly from the web (such as under WEB-INF), you can then write a servlet that delivers this content.

As pradheesh suggested, a filter would allow you to check a user's session scoped credentials to determine whether a request for a particular resource should be granted or not.
 
nelson christos
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
any refrence site for filters will be very thankful
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The important part is not so much the filter (which can be used to implement this, but there are other ways as well), but that any access to data is checked against the credentials. Any database query should contain a clause that filters out any data the user is not allowed to see.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic