How to make Tomcat reread user's role from database

2003-07-10 Thread Michael Mattox
My website uses a subscription based service, and we're using WorldPay (similar to PayPal I believe) to handle the credit card billing. I've defined roles for each of the subscription levels: trial trial_expired bronze silver gold The problem is when a trial user registers, they become

Re: How to make Tomcat reread user's role from database

2003-07-10 Thread Rick Roberts
Assuming I understand your problem: You may want to try populating a session object from the database and then update that session object when the user changes his role info. Then use the session object to make decisions, rather than need to re-read the database each time. Michael Mattox

RE: How to make Tomcat reread user's role from database

2003-07-10 Thread Mike Curwen
To: Tomcat Users List Subject: Re: How to make Tomcat reread user's role from database Assuming I understand your problem: You may want to try populating a session object from the database and then update that session object when the user changes his role info. Then use the session

Re: How to make Tomcat reread user's role from database

2003-07-10 Thread Rick Roberts
Mike, I read this after I posted in the other thread. Looks like you answered some of my questions here already. Sorry 'bout that. Again, you are very helpful. Thanks, -- *** * Rick Roberts* * Advanced Information Technologies,

RE: How to make Tomcat reread user's role from database

2003-07-10 Thread Michael Mattox
If it works as expected, then (Michael M) what you might consider is on the servlet that 'upgrades' the user from trial to 'not trial' invalidate the session, and redirect to a protected page. This would make the container authenticate the user again, meaning the user would need to login

Re: How to make Tomcat reread user's role from database

2003-07-10 Thread Tim Funk
A simple alternative is to add a page which has a meta-refresh - and the user gets a message saying you'll be redirected in a moment. Then meta refresh action automagically logs them back in. -Tim Michael Mattox wrote: If it works as expected, then (Michael M) what you might consider is on the