File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes how to stop user to acces directly inner page of a website Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "how to stop user to acces directly inner page of a website" Watch "how to stop user to acces directly inner page of a website" New topic
Author

how to stop user to acces directly inner page of a website

santosh kimothi
Ranch Hand

Joined: Jun 10, 2009
Posts: 32
suppose a user enters directly inner page uri without authentication, then by default it displays that page.

how can i disable this action, means anybody without login should not be able to see the inner pages...


Santosh Kimothi,
Java programmer
manoj r patil
Ranch Hand

Joined: Jun 06, 2002
Posts: 181
Are you validating the session on each page? I guess internal page means the pages hosted as part of your web application.


love your job and not your company;
...because you never know when your company will stop loving you!
samir singha
Greenhorn

Joined: Mar 17, 2008
Posts: 23
You can use servlet to set a session attribute of a request say "login" to true or false by using the password check mehtod you created. Every inner jsp page should get the login attribute and check whether it is true or false. if the login attribute is false or null redirect the page to login page of your application.
samir singha
Greenhorn

Joined: Mar 17, 2008
Posts: 23
Any better idea on this topic???
Anirvan Majumdar
Ranch Hand

Joined: Feb 22, 2005
Posts: 261
Try setting up the <security-constraint> and <web-resource-collection> in your web descriptor. That should work just fine.
Somnath Ghalimath
Greenhorn

Joined: Oct 27, 2009
Posts: 1
The other efficient way of achieving this is by using filters. As any incoming request should and must go through the filter, In the filter you can have the authentication logic which prevents the illegal access of secured pages.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to stop user to acces directly inner page of a website
 
Similar Threads
Session management in Servlets
Navigation Question
I want two buttons on a page, one for "search refine", one for "submit", how to do ?
Regarding session
is there any isNew() method in jsp??whats its use??