Login Session Bean - refresh/cache problem?
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Anonymous
Posted On:   Thursday, June 20, 2002 07:40 AM

Hi, Being fairly new to this, I hope this will be an easy question for you guys! I am trying to implement a session bean which stores user login info. An html form is used to input userid and password. The details are then verified against and XMl file and if ok control passed on to the first page of the site. The bean will be accessed in all jsp pages on my site and if not found to contain valid info then the user will be redirected back to the logon page. This works fine up to a point - i.e. if a user logs in successfully then the bean is popualted and is indeed available to the rest of the pages in the site. However, if a user tries to acces one of the pages in the site without logging on he is sent back to the logon page (as expected),   More>>

Hi,

Being fairly new to this, I hope this will be an easy question for you guys!

I am trying to implement a session bean which stores user login info. An html form is used to input userid and password. The details are then verified against and XMl file and if ok control passed on to the first page of the site. The bean will be accessed in all jsp pages on my site and if not found to contain valid info then the user will be redirected back to the logon page. This works fine up to a point - i.e. if a user logs in successfully then the bean is popualted and is indeed available to the rest of the pages in the site. However, if a user tries to acces one of the pages in the site without logging on he is sent back to the logon page (as expected), but then after logging on and returning to the first page in the site, the bean appears not to be populated and the user is passed back to the logon screen again. If I force a refresh on the first page it shows that the bean is in fact populated. So, is this a caching problem, or is it because I am using javscript document.location="URL" to pass control to the first page after succesful logon?

In summary, cos this is hard to put in words! If a user jumps straight to the first page of my site he is forced back to the logon screen because the logon bean is not populated. However, after subsequently logging on and being passed back to the first page in the site, the bean still appears no to be populated unless the page is refreshed.

Anyone help?

Rog

   <<Less
About | Sitemap | Contact