jQuery in Action, 2nd edition*
The moose likes Servlets and the fly likes encryption of data shown in the address bar Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "encryption of data shown in the address bar" Watch "encryption of data shown in the address bar" New topic

encryption of data shown in the address bar

nelson christos
Ranch Hand

Joined: Aug 08, 2006
Posts: 57
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

i think therefore i am
pradheesh manohar

Joined: Oct 09, 2006
Posts: 10
Hi nelson you must be implementing Filter interface for this
Ben Souther

Joined: Dec 11, 2004
Posts: 13410

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.

Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
nelson christos
Ranch Hand

Joined: Aug 08, 2006
Posts: 57
any refrence site for filters will be very thankful
Ulf Dittmer

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

Ping & DNS - updated with new look and Ping home screen widget
I agree. Here's the link: http://aspose.com/file-tools
subject: encryption of data shown in the address bar
Similar Threads
dynamically insert row with focus next
how one servelet call another servelet with define http method.
how to pass an attribute to a request?
how to disable adress bar in explorer
Submitting a JSP page after a predefined Time limit