0

"Server temporarily unavailable (0)" message

asked 2010-12-16 08:52:07 +0800

fjulbe gravatar image fjulbe
30 1

Hi all,
I'm facing an small problem.

The scenario is the following:
1. I have a zk web app running against an authentication CAS service. After login, I can use the tool, etc.
2. If I log out of the tool from another tab, when I try to keep working in my zk app (clicking on a button, for example) I get the message: "Server temporarily unavailable. Try it again? (0)" which is a little bit misleading. I would really like to customize this message pointing to a more helpful action to be taken by the user (basically, reload the page, that would send him back to the login page).
Is there a way to customize this message without having to go deeply into the zk.jar file? (I could do it changing a messages js file inside).

Cheers.

delete flag offensive retag edit

7 Replies

Sort by ยป oldest newest

answered 2010-12-16 20:44:54 +0800

samchuang gravatar image samchuang
4084 4

Hi

can you provide sample code for re-produce your issue ?

link publish delete flag offensive edit

answered 2011-01-12 07:21:15 +0800

fjulbe gravatar image fjulbe
30 1

It is not really a code problem. I don't really know what to post to help you understand the case.
It is a configuration problem and does not matter what code are you using. The thing is how to customize that message in case you have been logged out from your app. from another tab.

link publish delete flag offensive edit

answered 2011-01-12 07:44:01 +0800

mjablonski gravatar image mjablonski
1284 3 5
http://www.jease.org/

Hi,

how about a simple solution: just copy a changed msg-file to /metainfo/mesg/msgzk.properties in your WEB-INF/classes. This overrides resources from Jar-files.

Cheers, Maik

link publish delete flag offensive edit

answered 2011-01-12 08:21:00 +0800

fjulbe gravatar image fjulbe
30 1

Mmmm... interesting.
Still, there is no error code for the case I'm trying to customize (mesg.FAILED_TO_RESPONSE="The server is temporarily out of service.").
So I can't add any property with an error code because does not exist in org.zkoss.zk.mesg.MZk, the class defining the error codes.
:-(

link publish delete flag offensive edit

answered 2011-01-12 18:44:47 +0800

samchuang gravatar image samchuang
4084 4

Hi

I search zk.jar's msgzk.js , but I didn't find this String, Server temporarily unavailable. Try it again? (0), any one know where is't come from ? is't from tomcat ?

link publish delete flag offensive edit

answered 2011-01-13 03:30:00 +0800

mjablonski gravatar image mjablonski
1284 3 5
http://www.jease.org/

Hi,

the message is located in zk.jar (/web/js/zk/lang/msgzk.js).

FAILED_TO_RESPONSE: "The server is temporarily out of service.",
TRY_AGAIN: "Would you like to try again?"

To overwrite, copy a changed version into WEB-INF/classes/web/js/zk/lang/msgzk.js.

Cheers, Maik

link publish delete flag offensive edit

answered 2011-01-13 05:06:22 +0800

samchuang gravatar image samchuang
4084 4

updated 2011-01-13 05:07:53 +0800

thanks~~ I thought it was one sentence

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: 2010-12-16 08:52:07 +0800

Seen: 916 times

Last updated: Jan 13 '11

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