473,395 Members | 1,948 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

forward the current session to a new page

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
3 1996
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
427 Expert 256MB
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
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

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

Similar topics

2
by: Mark Watkins | last post by:
suppose I have the following: -----------BEGIN page1.asp---------- <form method="post" action="page2.asp"> <select name="someData" size="1" class="smallbutton"> <option...
2
by: Chris | last post by:
I have a script that will navigate back and foreward using a form. The files it navigates are named: bg1.html, bg2.html, bg3.html, etc. This is happening in a frameset, where my BACK and FORWARD...
4
by: Igor | last post by:
Is it possible to point current context's session to another active session based on a SessionID?
15
by: SFX | last post by:
If I have a session ID (string) can I somehow obtain the session object associated to that ID (it exist of course) ? I know this sounds wicked but I have a situation in which I have to make a...
3
by: John Dalberg | last post by:
I am setting the HttpContext.Current.User in the Application_AuthenticateRequest event in global.asax.cs. When I use the IsInRole function in a web page, it works fine. So far so good. (Note that...
0
by: Rodusa | last post by:
I am trying to replace cookies with the new "Asp.net 2.0 profiles" in my shopping cart application, but I am having trouble to access profile properties using HttpContext.Current.Profile. I can...
2
by: ABC | last post by:
How to I know the previous page is clicked to forward the current page? As our web site have many methods to enter the web page, I need to know the users clicked which link or which part of...
9
by: Edge | last post by:
hi, I am saving the user selected culture in a session variable so I can apply it back to all pages when refreshed and then load the proper .resx values. For that I am using global.asax
8
by: eric | last post by:
I have a 2.0 asp.net project. In a class contained within a seperate project, I am trying to reference HttpContext.Current.Session but Session is always null. I've tried implementing...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.