Does an AJAX call keep the session alive ?
Hi
I am not sure whether this is a question which I should post here.. but..
I have a jsp which makes some AJAX calls depending on user action..
well, my understanding is.. the server will not differentiate whether the request from the client is a synchronus or asynchronus one.. and if it did get a request from the client, the session will not time out within the time limit specified. So my question is there anyway the AJAX call will not actually affect the session time out ?
Is my understanding as mentioned above.. wrong ?
Thanks in advance
Thanks for the answers.. I will reframe the question.
I have a jsp with a huge number of html objects.. say "text boxes".. well imagine an excel sheet.
The session time out is set to be 20 minutes in the web.xml.
The user has to go through each and every cell in the page to enter data.. and ideally it will take more than 20 minutes. On change of certain cells or text boxes.. I do have an Ajax call which fetches some data from the server and this feature was not there before.
The organizational security standards does not let me increase the session time out to more than 20 minutes. Since I have these intermittent AJAX calls, I believe that since the server doesnt know whether it is a synchronus or asynchronus request, the session wont time out if the AJAX call happens in between while the user is working on the page. I agree that it is a simple thing which I can test and find out.. but I still wanted to know whether my assumption is right.. before I stick to it.
I am not sure whether I made the reframing look more complicated. Let me know.
Similar Messages
-
Problem with multiple Ajax calls to the same Servlet
Hi,
I am new to AJAX. I have a requirement where in, i have to make ajax calls to the same servlet in an infinite loop and check for an application context attribute to refresh the contents in the JSP.I am using the following script in JSP. The problem is i am not able to invoke the servlet more than one time.But I am able to go through the script at specific time interval using setInterval() function of Javascript and able to get alerts.But the problem is with xmlhttp.open("Get", url, true);. Its not getting called more than one time, even though i make multiple calls to the function.
*<script type="text/javascript">*
var xmlhttp
var resp
function fAjax()
alert("Here");
xmlhttp=null;
resp=null;
// code for Mozilla, etc.
if (window.XMLHttpRequest)
xmlhttp=new XMLHttpRequest();
// code for IE
else if (window.ActiveXObject)
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
if (xmlhttp!=null)
xmlhttp.onreadystatechange=state_Change;
xmlhttp.open("GET","/PSAPBackOffice/TestServlet",true);
xmlhttp.send(null);
else
alert("Your browser does not support XMLHTTP.")
function state_Change()
// if xmlhttp shows "loaded"
if (xmlhttp.readyState==4)
// if "OK"
if (xmlhttp.status==200)
resp=xmlhttp.responseText;
//alert(resp);
if (resp=="CALL"){
form.method="GET";
form.action="/Project/Details.jsp
form.submit();
else
alert("Problem retrieving XML data")
function callTimer(){
setInterval("fAjax()",5000);
*</script>*
*Code for Servlet here:*
public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException
ServletContext objContext= getServletContext();
String value;
synchronized (objContext) {
value=(String) objContext.getAttribute("Flag");
if(value==null){
else if(value.equals("Done")){
response.setContentType(CONTENT_TYPE);
PrintWriter out = null;
try {
out = response.getWriter();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (NullPointerException npe) {
// TODO Auto-generated catch block
npe.printStackTrace();
objContext.setAttribute("Flag","No");
out.println("CALL");
Can someone figureout the problem or mistake and help me out.Its urgent and please help me in this regard.Thanks in Advance !I'm not sure I'm following you. The mapping from URL to servlet can contain anything you want. So you could have the URL /blah/blah/blah that, with a mapping something like /blah/* would pass all requests with that URL pattern to your servlet - no one has to know it is a servlet. Your servlet could then parse the URL to see what it has to do or you could pass parameters as part of the URL or as hidden fields.
-
Possible to attach an Interactive pdf to DPS ? ( & Keep the interactivity alive )
Hi,
Is it possible to open an interactive pdf from an DPS app and keep the interactive alive
( buttons /textboxses /submit / send to email ) ?
I know how to make an zip-folder and link to the document form a button ( HTMLResources/filename.pdf )
But the pdf is flatten , and the document is useless for my purpose.
It would be great if this worked, and Adobe DPS could be even more handy than it is to day
I know it's also possible to import html to indesign, and I have tried to make a form in Dreamwaver.
The form looks nice on the Ipad & the buttons/ text fields works. But when I press submit ( mailto url ) the email opens.. But no data follows.
( Might be something wrong with the form of course )
If I could link to Adobe Reader ( where the document already exist ) from the DPS-app.. that could be an solution/ and the interactivity works in Reader..
But I haven't found any way to do that.
My wish for the DPS of the future is that it would be more like MUSE. More options/ menus and no coding
If someone have any good ideas on this issue, please let me know.Hi, after my first post in this issue I have solved the problem my self.
The answer is to use Dreamweaver.
1. Create an form with all the information you need in Dreamweaver. Be aware of the pixel value of the form, should not be larger than the Ipad
Import the HTML into Indesign (Object /import HTML )
If the form is larger than the Ipad - You can resize the imported html "frame" and use scale to fit in the web content menu.
But in this way you don't have 100 % control of what your doing.
After you imported the code in Indesign, and used the settings you like in web Content ( Folio Overlays ) Upload the DPS article as usual.
2. Another way is to create an HTML article, where you import a folder with all files the form consist of ( Pictures, CSS and the HTML form )
A lot more you can do in this way like dropdown menues, fading images ++ . But is a bit more complicated workflow. So go for nr. 1 -
How can i keep the session always live and active
how can i keep the session live ? i tried to call getmessages every 30 seconds and nothing happens
i need your help to tell me how to keep session live always
please i need steps which can helpi open session
then i login
then i change status to active
then i call dialexternalnumber
but i want to know how you keep the session active can you please send me the steps in details how you keep your session active ? but please in detailed steps
many thanks for your great effort -
How can I listen to music from iphone 4s via apple tv while doing a phone call at the same time?
When I take a call on the iphone, iphone stops streaming the music to apple tv until I finished the call.
thx!
Claus
PS: did ask the same question to apple hotline in germany. Answer: we don´t know... funnyWelcome to the Apple Community.
As far as I know you can't, which sort of makes sense, it seems logical to pause whatever you are doing while you take a phone call, which after all is the primary function of a phone. -
Ie is not keeping the session in windows phone browser ie10
Hi,
I have been working on windows web application..App is not keeping the session once the app is closed..I am getting session expired error..I have to proceed the user even after user closed app for certain time.Please some body help me!
ThanksHi Nagaraju,
In my opinion, this thread is related to Windows Phone forum. So please post thread on that forum for more effective response. Thank you for understanding. Please refer to the following link.
http://social.msdn.microsoft.com/Forums/wpapps/en-us/home?category=wpapps%2Cwpdev%2Cwindowsphone%2Cwindowsmobile%2Cwindowsphonezh.
Regards,
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
Hi
I have a problem in LSMW ..we have ECC 6.0 ..I have completed 14 steps and created a session ..i processed fore ground as well as background ...there was no errors but the session was disappered...i wanted to see the session even if there are no errors...i used to see like this when i was working on 4.6, 4.7.
I tried checking the box Extended log..and there was no option (keep the session checkbox) in ECC
Please let me know how to keep the session regardless of success or falilure of the session..
Thanks
MadhusudhanIf your Session has deletion indicator selected, than it would be deleted as soon as it is successfully processed.
To set this deletion indicator by default from LSMW program, you need to select "Keep batch input folders" checkbox.
Once the Session has been created, you can go to SM35 to change this indicator
Select the Session (double Click)
Press button Folder Header
Here you would find a small button next to Deletion Indicator. It should be blank in order to retain this Session.
Regards,
Naimesh Patel -
How to keep the connection alive?
Hello! Happy new year!
I have to write an HTTP server that comunicates with many clients in the same time,but keeps the connection with a client open if there the corresponding header is Keep-Alive. I have used threads,and I've tested my program in the following way: I've requested the one page of the site and then I've followed a link from that page. I expected that the broowser and the server talk to the same thread every time,but it seems that they don't. The code I've written is:
//HTTPServer class
ServerSocket serverSocket = null;
boolean listening = true;
try {
serverSocket = new ServerSocket(80);
} catch (IOException e) {
System.err.println("Could not listen on port: 80.");
System.exit(-1);
while (listening)
new HTTPMultiServerThread(serverSocket.accept()).start();
//HTTPMultiServerThread
public void run() {
// System.out.println(socket.toString());
try {
while(!serverSocket.isClosed())){
DataOutputStream out = new DataOutputStream(socket.getOutputStream());
DataInputStream in = new DataInputStream( socket.getInputStream());
int nrBytes = in.available();
if(nrBytes > 0){
byte[] bytes = new byte[nrBytes];
in.read(bytes);
System.out.println("Procesez mesajul:" + nrBytes + new String(bytes));
HTTPMessage processedMess = new HTTPMessage(bytes).processMessage();
System.out.println("Inchid conexiunea.");
log("log.txt", new HTTPMessage(bytes).getStatusLine() + " " + new Data().getCurrentTime());
//send the message
out.write(processedMess.getBytes(),0,processedMess.getBytes().length);
/* inchid conexiunea
else{
String ret = new String("HTTP/1.1 500 Internal Server Error\n");
ret += "Host: cristi\n";
ret += "Date: " + new Data().getCurrentTime()+"\r\n";
ret += "\r\n";
ret += "<html><body><p>HTTP/1.1 500 Internal Serve Error</p> </body><html>\r\n";
out.write(ret.getBytes());
out.close();
in.close();
if(new HTTPMessage(bytes).getHeaderValue("Connection").equals("Close"))
socket.close();
}//end while
} catch (IOException e) {
e.printStackTrace();
}I would also like to know how many clients are waiting to be served,in order to develop statistics about the server response time. 10Xhi
same to u .
i think what i get from ur code that ....
use some vector at the server side and whenever any client is connected (offcourse first time or not (depend on u !!)) create an object corresponding(generally created by server for every client) ..
save this in the vector .. and pass it the size of vector to the client with the response .
may this help u .
regards
akash
Indiagames Ltd
[email protected]
India -
Starting a managed server session and keeping the session when you exit
I created a managed server named "xxx_mgd" with the create managed server wizard in the admin console
when I start the managed server it produces a prompt for the username and password, whcih is the same username
and password entered when i was created. The issue I have is that when I exit the session, the process dies.
In comparison to the starting of the admin server, which is started with custom scripts which calls the standard wl startup scripts and it runs in background using nohup....
Is there away to start my managed server the same way, so that it stays running when you exit. I have tried running it as the admin server, using an option where the password if fed, but it dies and never startup
If you have any clue let me know
JosephAssuming that you are running WebLogic version 9.x and above.
Copy the "security" folder inside DOMAIN_HOME/servers/AdminServer directory to DOMAIN_HOME/servers/ManagedServer directory.
This security folder will have boot.properties file which contains encrypted username and password which is used when starting the server.
You can run Admin Server in background using nohup command as below from DOMAIN_DIRECTORY. This command will redirect stdout to AdminServer.out file.
nohup ./startWebLogic>>AdminServer.out &
You can run Managed Server in background using nohup command as below from DOMAIN_DIRECTORY/bin folder. This command will redirect stdout to ManagedServer.out file.
nohup ./startManagedWebLogic.sh <Managed Server Name> t3://<AdminServerListenAddress>:<PortNo> >>ManagedServer.out &
Hope this helps.
- Tarun
Edited by: Tarun Boyella on Feb 3, 2011 2:09 PM -
Why does imovie need to keep the original file after I have edited?
I record basketball games with my ipad and I keep the footage but cut the video so I can make highlights for the season. Thing is, these original videos are usually close to 10GB each and over an hour long.
I might have 5 minutes of highlights when Im done.
So to save space in my Imovie projects, I kept the clips i want and deleted the videos. When I came back to add more video to my season project, it said missing file.
Does it need to save the entire original media after I cut the video? I dont want to keep every game on my computer, I just want to keep what I cut and throw the rest out. But Imovie is asking for the original file.
Any solutions for this, or do I need to upgrade to a more professional editor?Hi
You are using a - Non Destructing Video Editing program.
Meaning that Your movie in making ==> Project - DO NOT contain any movie or material at all - BUT only a text document pointing to where material is stored e.g. folder iMovie Event's, other hard disks, DVDs, CDs or USB-memories.
And if any of these storage's are moved or disconnected - iMovie get's lost and can not View Your Project.
iMovie - do not have any "Media Managing Function" as FinalCut Pro (as it can reconnect moved material and create a complete contaning folder)
Even when You Shared Your movie - there still will be links back to material - to make it possibly to further editing's, and Sharing in other resolutions.
This is the cost of working this way. So I use an external hard disk for storage
- MUST BE - Mac OS Extended (hfs) formatted - UNIX/DOS/FAT32/Mac OS Exchange will not work for VIDEO
- Moving Video Event's - MUST BE DONE WITHIN iMovie Application - ELSE connections will be broken - meaning HARD to IMPOSSIBLY to mend later. Be aware !
All other material I store in Folders named as movie project + date - all from start on the external Drive.
Yours Bengt W -
I manually re-synced my ipod with all of my music because I had typed in a bunch of names where my library had previously said track#/unknown album, and when I was done syncing, a good percentage of the album art was scrambled. When I try to manually change the artwork on the inappropriately tagged albums or delete and re-sync the album, it does not keep the artwork that I assign to it or the correct artwork that is associated with it in itunes. Is there anything I can do to fix this?
It seems like I've seen this... I think you should un-sync all music (in iTunes) hit Apply and then resync it all back on.
-
Does FaceTime audio call use the Apple ID instead of email address or phone number?
My wife and I each have our own iphones. The Facetime audio calls come through OK for each one of us, as the calls are set to be received on each of our own email address and phone numbers (so there is no issue here). But when Facetime audio calls come through, both phones ring at the same time. I am guessing the FT audio calls (unlike the video calls) are using the Apple ID which is the same for both our phones. Is this the case? And if so, is the only fix, to set the phones on different ID's? Why are audio and video calls set up differently?
It depends upon the device that they are on - from http://support.apple.com/kb/HT4319
To call someone using FaceTime, you need their phone number or email address. Which one you use is determined by the device you are calling:
When calling someone using an iPhone 4 or later: Try the phone number of the person you are calling first. If the person has registered an email with FaceTime, you can use that as well.
When calling someone using an iPad 2, iPod touch, or FaceTime for Mac: Use the email address designated for FaceTime of the person you are calling.
On iPad 2, iPod touch, and FaceTime for Mac, you need to add a person as a contact using the FaceTime or Contacts app before you can call them. -
How does Skype to Call recognise the names
Is it just recognising the names from my contacts or the names of all people who have Skype accounts?
Is there anything special that needs to be done on the web page to make Click to Call recognise it as a Skype name?
Does the named person have to have configured their Skype to show their presence on the internet?
I have visisted a couple of sites with the names of some of my Skype contacts on them and I'm not getting the click to call functionality against the name.Skype To Go number
This webpage will provide some answers.
TIME ZONE - US EASTERN. LOCATION - PHILADELPHIA, PA, USA.
I recommend that you always run the latest Skype version: Windows & Mac
If my advice helped to fix your issue please mark it as a solution to help others.
Please note that I generally don't respond to unsolicited Private Messages. Thank you. -
Why does OS X Mavericks keeps the iWork 0'9 and iMovie 9.0.9
I have just udated Mavericks and I saw in my applications tab on finder that iWork 0'9 and iMovie 9.0.9 still there, and I just don't know why. Normally the old software is deleted. Isn't it?
Zaphod!
How's things out in the Galaxy?
Have you tried booting up off your OSX Install Disc and running Disk Utilty from there to "Repair Disc"? -
Why does PDF export not keep the layout as the indd file?
I have a 132-page book ready to upload for printing. It says in the pages panel 132 pages in 67 spreads. There are no sections, chapters or automatic page numbers. When I create a pdf, the (intentional) blank page that is supposed to be page 2 (on the left side of the first spread) moves itself to the position of page 1 (supposed to print on the right as very first printed page). This, in turn, puts page 1 on the left and pulls the rest of the pages in the book off, ruining the spreads. Any ideas as to why this is happening? Thanks!
High-Quality Print is for outputting to office printers. There are a number of Press-ready settings - ask your printer which one to use.
In the meantime: Open your mis-flowed document in Acrobat and under Page Display, see if Show Cover Page in Two Page View is checked. If not, check it and see if that fixes the problem.
Maybe you are looking for
-
How Can I Create a Record/Report Grid on a Page
I want to build a page on which I can display a MySQL table record grid as a report, so that a user can select certain lines for further processing (e.g. emailing "action due" information to a customer). I've searched and searched, but everything I
-
Firefox 3.??? wasworking well. I downloaded firefox 4, and all was well. It posted an icon on my desktop and then told me to reboot to complete the installation. I did, I did, and several moore times yhe computer has been rebooted, but with no succes
-
Outputting DVD Player to Television
My home DVD player is dying slowly-about half of my collection no longer plays on it, but everything plays fine on my PowerBook. I was wondering if it's possible to plug my PB into my TV, and then output whatever is showing in DVD Player.app to the t
-
HT3529 send a message as an email?
Forward a message as an email?
-
Hi, We would like to do basic VLAN assignment in a Catalyst 3524-XL that doesn't support 802.1x. Can we somehow use ISE (iPEP maybe) or do we have to use NAC? Thanks, Carlos