By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,947 Members | 1,548 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,947 IT Pros & Developers. It's quick & easy.

forward the current session to a new page

P: 16
I have a .jsp page with a button that is supposed to forward the current HTTP session to a new page (performing the same function as a form submit button, except without creating a new session). The button has an onclick action of "buttonAction()".

I then have a javascript function for it that I want to use to go to a new link with the same session. I tried setting the window.location, but this does not forward the session. Is there a javascript command that allows me to do this? This seems like an easy fix, but I'm going crazy trying to find ANY information.

Thanks if you can help, or can point me to any information that would help.
Wes
Jun 20 '07 #1
Share this Question
Share on Google+
3 Replies


P: 16
I have also thought of using a Java method in the .jsp page, but I do not know how to access the request and response from a <%! public void buttonAction() { } %> method. I can access the request and response in a <% scriptlet %>, but not within a <%! declaration %>.
Jun 20 '07 #2

rnd me
Expert 100+
P: 427
anytime window.location.href changes, the page is redrawn.

possible workarounds:

1. use a master page with 2 fullscreen iframes that 'leapfrog' eachother, passing the state using top. uh top.document.cache for ex..

2. use ajax to redraw body.innerHTML.

3. save all session data to a cookie, IE xml store, FF2 globalStorage, etc.
-bind body.onload to a loader, and onunload to the saver.

4. you can pass 2kb to the right of a "?" in the url.

5.use the clipboard to persist.

6. submit all session data in the page request, shadow it back in the new page.

7. use cookies to store values.

8. use a combo of sessionStorage and ie history persistence.

9. use a hidden iframe that changes location while the viewport remains.

10. if none of these work for you, there are a few more options.
Jun 21 '07 #3

P: 16
Thanks for the generous reply rnd me, these are a lot of good suggestions that I will look into. I have never used Ajax before, but I get the feeling that maybe I should check it out.
Jun 22 '07 #4

Post your reply

Sign in to post your reply or Sign up for a free account.