0

Problem with redirection

asked 2017-01-20 11:02:20 +0800

vvico gravatar image 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 flag offensive retag edit

7 Answers

Sort by ยป oldest newest most voted
0

answered 2017-01-20 11:41:31 +0800

Darksu gravatar image Darksu
1976 1 4

Hello vvico,

Can you please provide more information on how you store the session information?

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

Best Regards,

Darksu

link publish delete flag offensive edit
0

answered 2017-01-23 07:55:51 +0800

vvico gravatar image vvico
3 2

updated 2017-01-25 11:13:46 +0800

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

link publish delete flag offensive edit
0

answered 2017-02-02 08:29:33 +0800

vvico gravatar image vvico
3 2

updated 2017-02-02 08:29:56 +0800

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

Thanks.

link publish delete flag offensive edit
0

answered 2017-02-02 09:44:09 +0800

terrytornado gravatar image terrytornado flag of Germany
9373 3 7 16
http://www.oxitec.de/

@see http://stackoverflow.com/questions/890935/how-do-you-remove-a-cookie-in-a-java-servlet

Cookie[] cookies = ((HttpServletRequest) Executions.getCurrent().getNativeRequest()).getCookies();
. . .
link publish delete flag offensive edit
0

answered 2017-02-02 13:15:28 +0800

vvico gravatar image vvico
3 2

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

link publish delete flag offensive edit
0

answered 2017-02-02 14:20:06 +0800

terrytornado gravatar image terrytornado flag of Germany
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>
 ...
link publish delete flag offensive edit
0

answered 2017-02-09 08:24:03 +0800

vvico gravatar image 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.

link publish delete flag offensive edit
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow
1 follower

RSS

Stats

Asked: 2017-01-20 11:02:20 +0800

Seen: 57 times

Last updated: Feb 09

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More