# Problem with redirection

vvico
3 2

Hi all, I have some problems on redirection after logging out and then trying to log in again; I explain:

The redirection after log in depends on the User's profile, if you are an administrator you go to Index.zul, if you are another profile you go to a different zul, the problem starts when I log in with admin (all ok), I relog with another profile (all ok) and I relog again with admin (this time, it redirects me like if i was non-admin profile, but debugging my current profile I can assure I'm logged as an administrator). If I clean cookies it works well, is there any way to clean cookies from java after log out or someone know any way to fix it?

Thanks all.

delete retag edit

Sort by » oldest newest most voted

Darksu
1976 1 4

Hello vvico,

There is a chance that something is not cleaned up properly.

Best Regards,

Darksu

vvico
3 2

I check the user's profile at loggin and depends on the profile i redirect them, at loggout I invalidate the Session (Sessions.getCurrent.invalidate()) the worst thing is that in one server its running OK and on the other server its not working with same code ...

We confirmed that cleaning cookies fix the problem.

Any way to clean cookies from java?

Thanks

vvico
3 2

I still having the problem, someone know any way to clean cookies from java?

Thanks.

9373 3 7 16
http://www.oxitec.de/
Cookie[] cookies = ((HttpServletRequest) Executions.getCurrent().getNativeRequest()).getCookies();
. . .


vvico
3 2

Thanks and sorry terry, i mean how to clean cache not cookies, my fault.

9373 3 7 16
http://www.oxitec.de/

Cache can only be cleared by the browser.

http://stackoverflow.com/questions/19923045/how-to-clear-browser-cache-from-servlet

declare the no-caching in the zul file.

<!DOCTYPE html>
<?html lang="en" ?>
<?page id="indexPage" title=" ZKBoost " cacheable="false"
language="xul/html" zscriptLanguage="Java"?>
<?meta content="text/html; charset=UTF-8" pageEncoding="UTF-8"?>
<?meta name="description" content="ZKBoost" ?>
<zk>
...


vvico
3 2

Thanks and sorry, i was bussy, i tried the code but it doesn't fix my problem, i will check again why it's not working, thank you anyway.