wood burning stoves 2.0*
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 Murach's Java Servlets and JSP this week in the Servlets 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
Author

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
Greenhorn

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

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
Marshal

Joined: Mar 22, 2005
Posts: 41062
    
  43
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 - my free Android networking tools app
 
jQuery in Action, 2nd edition
 
subject: encryption of data shown in the address bar
 
Similar Threads
how to disable adress bar in explorer
how to pass an attribute to a request?
Submitting a JSP page after a predefined Time limit
dynamically insert row with focus next
how one servelet call another servelet with define http method.