473,803 Members | 4,391 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

forward the current session to a new page

16 New Member
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 2009
wesomon99
16 New Member
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 Recognized Expert Contributor
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.ca che 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
wesomon99
16 New Member
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
3741
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 value="1">Whatever</option> </select> 'and a submit button </form> ----------END page1.asp--------------
2
1432
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 buttons are in one frame, and the content pages are in another (main). I can get read the current page location in the frame "main", but it is not working (getpagenumber)- it should give the current page number, and use that number to tell the...
4
2024
by: Igor | last post by:
Is it possible to point current context's session to another active session based on a SessionID?
15
1896
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 request from the client (IE) but for security reasons I can not access the headers of the current request, so I can not make my new request contain the same session ID cookie. So I was thinking that if I pass the session ID as a parameter which I...
3
2798
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 Integrated security is used and anonymous is turned off.) This app will actually work as a child app for an Intranet app so when I remove the application designation in IIS for the child app folder, IsInRole is always null, which is not good. I...
0
2189
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 access any other property property of this class from a regular aspx page, but not from inside the class itself. This is the piece of the code that I am trying to get to work which can also be located at the bottom of the page, but so far just...
2
1740
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 page to enter the web page.
9
3920
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
996
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 IRequiresSessionState but it does not seem to matter. For a test I created a small solution consisting of a web project and a seperate project to hold a test class. In the test class I reference HttpContext.Current.Session and it works fine with or without...
0
10542
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10289
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9119
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7600
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6840
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5496
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5625
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4274
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2968
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.