473,804 Members | 2,064 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to check when session is expired while using DOJO

58 New Member
Hi All,

I am having a problem. I am using DOJO toolkits to fetch some data on my webpage. Now suppose if i leave my webpage for some time and the session gets expired and then i try to click on the link which invokes the DOJO(AJAX) call, it tries to re-authenticate and establish a session by itself. But, it then forwards me the authentication JSP as result of DOJO call instead of the intended JSP. PLease let me know how to track if the session has been expired in DOJO calls. Or if you have any solution for this problem.
Note: I using the following
Java Struts/ Dojo toolkit
Jan 5 '08 #1
15 13407
acoder
16,027 Recognized Expert Moderator MVP
Just check if the authentication JSP is returned or you could use another JSP file which returns true or false depending on whether the session has expired or not.
Jan 5 '08 #2
plsHelpMe
58 New Member
Just check if the authentication JSP is returned or you could use another JSP file which returns true or false depending on whether the session has expired or not.
hi acoder,
Actually in my application whenever session gets expired and you try to hit the server, you are autometically authenticated first. Now in my case the application's automatic attempt of authenticating it returns me the code of the jsp which gets displayed just after you login to the application. Its a kind of jsp showing that you are using ssl connection and click on OK to continue.
In order to proceed further i have to click on the ok button on this jsp. I dont know how to do it. I dont want to show this jsp in any div on my page. Moreover if i refresh the page i get the jsp which is having the coding which i utilise when normally return from ajax call. The code of this jsp gets displayed to me.
Jan 9 '08 #3
acoder
16,027 Recognized Expert Moderator MVP
You can display the page in a hidden iframe. Then access the iframe and use the button's click() method.

What does the OK button do? Does it submit a form?
Jan 9 '08 #4
plsHelpMe
58 New Member
You can display the page in a hidden iframe. Then access the iframe and use the button's click() method.

What does the OK button do? Does it submit a form?
Yes the OK buttton submits a form to an Action which creates the entitlements and lots of other things and forward it to the action which is handling my ajax call. That action forward to the jsp which is having some data which i am using in my original jsp
Jan 10 '08 #5
dmjpro
2,476 Top Contributor
Hi All,

I am having a problem. I am using DOJO toolkits to fetch some data on my webpage. Now suppose if i leave my webpage for some time and the session gets expired and then i try to click on the link which invokes the DOJO(AJAX) call, it tries to re-authenticate and establish a session by itself. But, it then forwards me the authentication JSP as result of DOJO call instead of the intended JSP. PLease let me know how to track if the session has been expired in DOJO calls. Or if you have any solution for this problem.
Note: I using the following
Java Struts/ Dojo toolkit
What I understood from your Question that is, you are trying to check whether session expired or not. And that is you are doing through a AJAX call. If AJAX call can successfully determine then it re-authenticates and establishes a new session. Right?
First let me know that. Then show me your code how much you did.

Debasis Jana
Jan 10 '08 #6
acoder
16,027 Recognized Expert Moderator MVP
Yes the OK buttton submits a form to an Action which creates the entitlements and lots of other things and forward it to the action which is handling my ajax call. That action forward to the jsp which is having some data which i am using in my original jsp
If it's a submit button, just make a request to the action page instead with all the POST parameters sent using the send() method.
Jan 10 '08 #7
plsHelpMe
58 New Member
If it's a submit button, just make a request to the action page instead with all the POST parameters sent using the send() method.

Hey buddy,

I am not suppose to touch the JSp behind that OK button
Jan 10 '08 #8
acoder
16,027 Recognized Expert Moderator MVP
Hey buddy,

I am not suppose to touch the JSp behind that OK button
Who said you have to change anything? Just look at what is posted and post that using Ajax. If that doesn't work, post your code from the beginning.
Jan 10 '08 #9
riyaztak
4 New Member
Hi All
I have a problem
I m using dojo to send a request.
But suppose my session has expired and i try to send request;it goes into infinite loop.
So will anyone telll me how to check whether session has expired or not?

I m using Dojo toolkit and jsp.
Thanx
Feb 23 '09 #10

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

Similar topics

1
2947
by: Lenny | last post by:
I have application that uses session variables to preserve data between calls Session expiration time is set to 20 min. Sometimes my users getting error 'Session Expired' even right after they log in to application! Any ideas how to get around this issue?
1
1827
by: szabelin | last post by:
Hello - (1) is there a way to check that session has expired? (2) My session timeout is set to 20 minutes, but I can leave the client overnight and my session is still on next morning- so when will it expire? Thanks
0
312
by: uni | last post by:
Hi, We are running asp.net application. Previously, there's no any other problem, but recently, the session expired error bumps out frequently like 10 minutes a time or so. The session timeout setting in the web.config is 1440. according to the memory utilization, I thought it's the memory limit, even I changed the memoryLimit setting in machine.config from 60 to 90, there is still the same problem. It looks like the worker process is...
15
4784
by: Nathan | last post by:
I have an aspx page with a data grid, some textboxes, and an update button. This page also has one html input element with type=file (not inside the data grid and runat=server). The update button will verify the information that has been entered and updates the data base if the data is correct. Update will throw an exception if the data is not validate based on some given rules. I also have a custom error handling page to show the...
1
2558
by: net4matrimonials | last post by:
I m using session veriables of asp.net on two websites www.net4professionals.com(job site) and www.net4matrimonials.com (bride/groom service) when i create a session on page A i use codeing session.timeout=180 session("name")="xyz" response.redirect("myaccountpage.aspx") on page B to access session variable i use
6
3350
by: NH | last post by:
How can I warn a user that their session has expired when they click on a button etc?
2
3087
by: fijsolam1981 | last post by:
Hi, I had created a web application where Session expiry was set to 2,000 minutes in IIS. in web config i had given like this <sessionState timeout="2,000" mode="InProc"></sessionStatebut MY web application was left logged in at 18:00 15th Oct, but on the following day 08:30 16th Oct, the session expired as soon as MY web application was used. It was also noted that during the day, MY web application occasionally got session expiry when...
5
3682
by: plsHelpMe | last post by:
How to create dynamic javascript arrays using dojo toolkits Hello frens, I am in a big trouble. My objective is: I am having some categories shown by differnent radio buttons, on the click of a particular radio button i making an ajax call using dojo and retirieving the data corresponding to that category. Now i am suppose to create array of that data using the javascript dynamically. Can anyone please help me for the same. For your...
2
1241
KalariaNitya
by: KalariaNitya | last post by:
hi to all, i have index.aspx form as main form..on that form one button GO which redirect to gallary.aspx form.. if i m doing nothing upto one or even less then one minute session goes expired and again back to ndex form.. i am not using global.asax form.. even i put
0
9595
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10354
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10359
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
9177
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
7643
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
6870
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
5536
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...
1
4314
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
2
3837
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.