0

sendRedirect and browser back button

asked 2007-07-06 14:40:58 +0800

admin gravatar image admin
18691 1 10 130
ZK Team


Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=4399790

By: kpodejma

is it possible to avoid errors in this case:
there is a button on page1 with falowing onClick method void onClick(){
Executions.sendRedirect("page2");
}

user clicks this button, so he is on page2 now on page2 he clicks browser's back button and gets error:

"the page or component you request is no longer available: ..."

please help me to deal with it.

Krzysztof



delete flag offensive retag edit

6 Replies

Sort by ยป oldest newest

answered 2007-07-06 15:20:47 +0800

admin gravatar image admin
18691 1 10 130
ZK Team


Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=4399855

By: waterbottle

Hi,

I don't have this problem in my testing.
Do you use .zul directly?

I think this is a browser cache problem.

In my experience, if you jsp/servlet to include/forward to zul file or zhtml, you should disable the browser cache like this:

httpResponse.setHeader("Pragma", "no-cache,no-store"); httpResponse.setHeader("Cache-Control",
"no-cache,no-store,must-revalidate,proxy-revalidate,max-age=0");

hope this help!

/Dennis

link publish delete flag offensive edit

answered 2007-07-06 16:25:31 +0800

admin gravatar image admin
18691 1 10 130
ZK Team


Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=4399975

By: robertpic71

>> httpResponse.setHeader("Pragma", "no-cache,no-store");
>> httpResponse.setHeader("Cache-Control",
"no-cache,no-store,must-revalidate,proxy-revalidate,max-age=0");

ZK makes all this settings (last check 2.3)

@Krzysztof
Please post your configuration:
ZK-Version
Browser
Proxyserver no/yes -> which proxyserver

In my case, it seems that Squidproxy and IE produce this error. Checkout this
bug-id:

http://sourceforge.net/tracker/index.php?func=detail&aid=1703278&group_id=152762
&atid=785191

I testet many configurations. Normally i have no troubles with the backbutton.

/Robert


link publish delete flag offensive edit

answered 2007-07-07 15:35:39 +0800

admin gravatar image admin
18691 1 10 130
ZK Team


Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=4401354

By: kpodejma

ZK-Version 2.4.1
Browser FireFox 2.0.0.4
Proxyserver no/yes: I use Apache2 with mod_jk and Tomcat ajp13

Krzysztof

link publish delete flag offensive edit

answered 2007-07-09 23:59:13 +0800

admin gravatar image admin
18691 1 10 130
ZK Team


Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=4404960

By: kpodejma

I have disabled cache in browser and all works perfect.
Unfortunately I cannot set headers in java. Is it possible to set it in web.xml in Tomcat or in zscript?

Krzysztof

link publish delete flag offensive edit

answered 2007-07-10 01:44:10 +0800

admin gravatar image admin
18691 1 10 130
ZK Team


Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=4405028

By: waterbottle

Hi,
ZK set header to disable cache on .zul and .zhtml file, and in my experience, if you are using .jsp or servlet to include .zul/.html file, you must set it your-self.

to Krzysztof.
I don't know how do you run ZK ? Why can your set heaers?
and, maybe you can take a look on Filter class.

/Dennis

link publish delete flag offensive edit

answered 2007-07-10 19:37:56 +0800

admin gravatar image admin
18691 1 10 130
ZK Team


Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=4406392

By: kpodejma

I have created filter class and set header for response there.
It works now.

Thanks
Krzysztof


link publish delete flag offensive edit
Your reply
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

RSS

Stats

Asked: 2007-07-06 14:40:58 +0800

Seen: 1,024 times

Last updated: Jul 10 '07

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