• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

Session Verification

 
Ranch Hand
Posts: 265
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Ranchers!!
I'm using jsp and oracle for doing my project.. So when i got logged in.. i used to put the user name and password in the session..
for egs :
1)main page is index.jsp..
2)main_menu_page.jsp

and the url for the following pages are
http://localhost:8080/test --> for index.jsp
and http://localhost:8080/test/main_menu_page.jsp

so when ever the users put the correct username and password..
then only they are able to see the main_menu_page.jsp

so i want to verify the session when the page is loading..

how to verify the session!! when the page is loading

ie., if a user comming and typing the url as http://localhost:8080/test/main_menu_page.jsp
and then pressing enter.. he has to redirect to the login page or index.jsp!!

so for that i want to check for the sessions first in all pages..
can u help me.. how to search for the session!!
if u can provide me code.. that is also ok!!

thanks in advance.

regards!!

Aravind Pasad..
 
Ranch Hand
Posts: 166
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
1. To verify the correct user, in main menu page take the user name and password from the DB and store it. when you are passing the value from the login page, check with DB value. If its not equal then redirect it.

2. In your main menu page, check the session value. If its null then 'redirect' to login page.
[ May 18, 2006: Message edited by: Sri Gnana ]
 
Lasagna is spaghetti flvored cake. Just like this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic