0

want to redirect before randering the page or before onCreate is called...

asked 2008-12-03 18:38:40 +0800

vinaykr gravatar image vinaykr
18

Hello all,

here is my problem:
I perform a check on a session variable in onCreate() method and if the session variable is not set, I do a redirect.
Problem is this gives a jittery effect since onCreate is called after rendering the page and if session var is not set, it immediately redirects to a new page after flashing the original page for half a second...
Is there any way, where I can put this check before rendering the page, so that even before rendering I can find out if the session var is set or not...

Thanks a ton!!
Vinay :)

delete flag offensive retag edit

3 Replies

Sort by ยป oldest newest

answered 2008-12-04 01:13:32 +0800

robertpic71 gravatar image robertpic71
1275 1

This should be possible via <?init .. or <?forward.. directive.

Check this thread.

/Robert

link publish delete flag offensive edit

answered 2008-12-05 06:14:21 +0800

vinaykr gravatar image vinaykr
18

Thanks a lot Robert!

link publish delete flag offensive edit

answered 2013-08-30 12:19:09 +0800

samroy gravatar image samroy
25 2

Page not found Sorry, could not find the page you requested.

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: 2008-12-03 18:38:40 +0800

Seen: 240 times

Last updated: Aug 30 '13

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