• 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 ...
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Junilu Lacar
  • Liutauras Vilda
  • Paul Clapham
  • Jeanne Boyarsky
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Jesse Duncan
  • Frits Walraven
  • Mikalai Zaikin

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..

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.


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 ]
pie. tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
    Bookmark Topic Watch Topic
  • New Topic