New session created with every request

Hi there,
I have an web application that we used to deploy on tomcat, websphere and bea without any trouble. We are trying to move to support OAS and the application gives this peculiar behavior:
A new session is created with every single request by the client browser. I have searched these forums for the better part of today and read some interesting similar cases but none of the fixes seem to have any effect on my problem.
Is there a different way I need to request the session object from the request in the app for OAS? Or is there a configuration that I should have? I am deploying the app as a .war file. Is there a better way to deploy on OAS, should I stick the war in a .ear?
Any help on this would be most greatly appreciated!
Thanks,
-Adam

I have a problem that matches with this subject line but its somewhat different. This original posting wants to create new session and invalidate the existing one but my problem is to keep the session invalide if it has expired for the browser.
Anyways, here is my problem. I have JSP named entity_actions.jsp which has 3 pop-up links that opens up with code like:
window.open('restaurantentry.do?entityName=restaurant')
window.open('districtentry.do?entityName=district')
window.open('baseentry.do?entityName=base')
My web.xml has this tag:
<session-config>
<session-timeout>5</session-timeout>
</session-config>
And the way forward the response for each request is:
context.getRequestDispatcher(urlString).forward(request, response);
The code I check for session timeout is:
private void checkForSessionTimeOut(HttpServletRequest request)
throws SessionTimeoutException
HttpSession current_session = request.getSession(false);
logger.info(CLASS_OBJECT, "Session in checkForSessionTimeOut(): "+current_session);
if (current_session == null)
logger.error(CLASS_OBJECT, "SessionTimeOutException has thrown.");
throw new SessionTimeoutException("sessionTimeOut");
Now lets say I want to show the end user session expiry page after 5 mins of idle time. Now from entity_actions.jsp when I click/open any one popup first time after 5 mins of idle time/session expire,
logger.info(CLASS_OBJECT, "Session in checkForSessionTimeOut(): "+current_session);
this loggers shows current_session as 'null' and I can display session exp mesg on the popup page. But when I click/open any other popup or any other link on the page it DOES WORK instead of having current_session = null, it creates new one. And I can see the sessionid which is different than fist session created on the same base page/browser.
The same pattern of code used to work on Tomcat and JRun before for showing consistant session expiry on all the clicks being made on the same browswer after session gets expire.
Why OC4J / JDev 10.1.3 is creating new session on the same browser even after session has expired?
How can I fix this?
Thanks

Similar Messages

  • New session created with every page request

    Hi,
    I have an application running in portal framset. A user logins into a portal and has access to several applications, that are displayed in a frameset. My application is creating a new session for every page in the application. Of course, I can't keep session variables and a large amount of sessions are being created. What could be the reason for this, and is there a work around?
    Thanks.

    There is a chance the you have cookies turned off. Sessions are maintained via a jsessionid which is stored in a user cookie. If you (or another user) don't use cookies, then the session will be lost.
    To fix this, every URL you use must be encoded, such that, if cookies are not used, the jsessionid is attached to the end of the URL. If you are using JSTL, the easiest way to do this is like this:
    <c:url var="formAction" value="someOtherPage.jsp"/>
    <form action="<c:out value="${formAction}"/>" method="GET">
    <c:url var="nextPage" value="nextInLine.jsp"/>
    <a href="<c:out value="${nextPage}"/>">Next</a> Or if you are not using JSTL, you can use scriptlets:
    <%
      String formAction = response.encodeURL("someOtherPage.jsp");
    %>
    <form action="<%= formAction %>" method="GET">
    <%
      String nextPage = response.encodeURL("nextInLine.jsp");
    %>
    <a href="<%= nextPage %>">Next</a>

  • New session started with an advertizing page and all my tabs are lost

    New session started with an advertizing page and all my tabs are lost. Restore the previous session is not active. How can I restore my tabs?

    This advice might come too late, but, don't exit Firefox! Or if you already did, don't start it back up again!
    ''If Firefox is running:'' Open your current Firefox settings (AKA Firefox profile) folder using either
    * "3-bar" menu button > "?" button > Troubleshooting Information
    * (menu bar) Help > Troubleshooting Information
    * type or paste about:support in the address bar and press Enter
    In the first table on the page, click the "Show Folder" button. This should launch a new window listed various files and folders. For best results, change the view to "Details".
    (''If Firefox not running, get to this folder by pasting the following in the Run box on the start menu and pressing Enter: %APPDATA%\Mozilla\Firefox\Profiles and then double-click into the most recently updated semi-randomly-named folder you find there.'')
    In the window that launches, scroll down and double-click into the '''sessionstore-backups''' folder. Save all files here to a safe location, such as your Documents folder, so Firefox doesn't overwrite them. We may be able to use them to recover your lost tabs.
    Also, if you return to the main level of the profile folder, you may find some sessionstore files. Copy those to the safe location as well.
    Could you report back on what you found?
    Note: If Windows hides the .js file extension from you, you can change a setting so that you can see all file extensions (this helps when renaming files). This support article has the steps: http://support.microsoft.com/kb/865219 or http://windows.microsoft.com/en-us/windows/show-hide-file-name-extensions
    The kinds of files you may find among your sessionstore-backup files are:
    * recovery.js: the windows and tabs in your currently live Firefox session (or, if Firefox is closed, your last session)
    * recovery.bak: a backup copy of recovery.js
    * previous.js: the windows and tabs in your last Firefox session
    * upgrade.js-''build_id'': the windows and tabs in the Firefox session that was live at the time of your last update

  • Session gets created for every request.

    Hi ,
    I have two servlets where i set a object in the session in one servlet say servlet1.java and get in another servlet say servlet2.java.
    When i pass my session object from servlet1 to servlet 2 , servlet2 is supposed to get the arrtibute , but its always gives me a null value.
    I found out that a new session is getting created every time when i try to access servlet2.
    I tried to print the session object , and it clearly tells me that the object is differet from the one i set.
    Can anyone let me know why is this happening and how do i solve this .
    This happens for me in weblogic 8.1 setup.
    In my JBOSS set up with the same code it works fine.
    Thanks in advance.

    Sasikanth,
    Pardon me if I am stating the obvious, but according to your description the problem is with WebLogic. So did you try a WebLogic specific forum?
    Good Luck,
    Avi.

  • Session regeneration at every request

    Hi All
    i know that the getSessionId gives me the current client session, this session is the same for every browser windows i open without closing the application before open a new browser window.
    i need to have a different session every time a client makes a login in the jsp page
    how can i generate a different session for every client request without closing th browser?
    thanks;

    hi,
    ie once u did login and without logout, again u r trying to login in the same browser. Correct?
    eg:
    now u r in ( Logged in )
    http://localhost:8080/mybank/transaction.jsp
    and removing /transaction.jsp from addressbar
    now addressbar contains http://localhost:8080/mybank and u r trying to access Again.
    Correct ?
    if this is the situation, at the Time of login invalidate the Existing session and create new session.
    and set values to new session( that will be there in ur code)
    AE

  • New session id with hosts or CNAME entry

    I am hoping someone can help me out with a problem I am having with host names and session ids. This may be something simple that I have forgotten about, so here it goes.
    Going through the jsp's below give different results, depending on the URL you use.
    If you use http://localhost:8080 or http://machine_name:8080
    The same session id will be seen on each page.
    If you use http://test_01:8080
    A different session id is displayed on each page.
    What would cause this to happen?
    Add the following files under the ROOT webapp of the default Tomcat 4.1.30 installation. Of course, I understand that storing data in servlet context like this is not a good idea, but for testing purposes it will do what is needed.
    index.html:
    Test_01
    <br><br><br>
    Call 1
    index.jsp:
    <html>
    <center>
    <%= request.getSession().getId() %>
    <% application.setAttribute( "session1", request.getSession().getId() ); %>
    <h1>Tomcat 1 Call 1</h1>
    Call 2
    </body>
    </html>
    index2.jsp:
    <html>
    <center>
    <%= request.getSession().getId() %>
    <h1>Tomcat 1 call 2</h1>
    Call 3
    <br><br>Session 1 ID:
    <%= getServletContext().getAttribute( "session1" ) %>
    <% application.setAttribute( "session2", request.getSession().getId() ); %>
    </body>
    </html>
    index3.jsp:
    <html>
    <center>
    <%= request.getSession().getId() %>
    <h1>Tomcat 1 call 3</h1>
    <br><br>Session 1 ID:
    <%= getServletContext().getAttribute( "session1" ) %>
    <br><br>Session 2 ID:
    <%= getServletContext().getAttribute( "session2" ) %>
    </body>
    </html>
    Add the following entry to your host file:
    127.0.0.1 test_01
    or
    <your ip> test_01
    or
    add a CNAME entry
    Thanks for any/all help.

    No, it has nothing to do with host names, CNAME, DNS or anything.
    The session ID is sent to the server from the browser in either a cookie header or as part of the "extra info" part of a URL with the request. If there is no session ID in either place, the server creates a new session. If there is a session ID, then it gets the session object (if it's not expired). Then it sends the session ID back to the browser with the response to that request (either as a cookie or encoded into the URLs in the page, which you have to do explicitly do for each URL). Click on a link, then the process starts again. The first time you go to a site, you have no session ID. The server just makes a new one.
    The only thing that domain names have any affect on is cookies. Cuz cookies are name/value data associated with a domain name of the server (amongst other things). The browser, for security reasons, only sends cookies in requests to servers that set the cookie in the first place. The server can't get cookies that it didn't set.
    So if you have a server running on your local machine, you can access that server in 3 ways:
    1) localhost
    2) network name
    3) domain name
    The browser can know quite easily that 1 and 2 are the same thing, and send cookies for either interchangably (not that it has to, but it seems you are seeing this happen, so...). But the browser will probably not make any assumption about 3's relation to 1 or 2. The association is generally to domain name, not necessarily IP address.
    And it's really a moot point anyway. You should not typically be accessing a server from those 3 different means within the same session. Someone connecting to your server isn't going to use anything but #3 anyway, the other 2 (definitely #1 and #2 only works on the same LAN) wouldn't make much sense. So there's not going to be this issue at all. The session ID itself has no relation whatsoever to a client's domain name.

  • URGENT: New sessions created as increasing hits/second! BUG in WL5.1 sp10?

              Hello,
              I am experiencing the same problem as mr. Rajesh Rajagopalan, only he had it with
              WL 6.0:
              http://newsgroups2.bea.com/cgi-bin/dnewsweb?cmd=article&group=weblogic.developer.interest.jsp&item=8925&utag=
              So when the number of hits increases, it looks like new sessions are created when
              the number of hits increases!
              Is that a bug in WL 5.1 service pack 10? I would like an answer from a BEA Weblogic
              official!
              

    Hello,
              I think that the best way is to open a case to the BEA support.
              "\"Bogdan Barzu\" Bogdan.Barzu" wrote:
              > Hello,
              >
              > I am experiencing the same problem as mr. Rajesh Rajagopalan, only he had it with
              > WL 6.0:
              > http://newsgroups2.bea.com/cgi-bin/dnewsweb?cmd=article&group=weblogic.developer.interest.jsp&item=8925&utag=
              >
              > So when the number of hits increases, it looks like new sessions are created when
              > the number of hits increases!
              >
              > Is that a bug in WL 5.1 service pack 10? I would like an answer from a BEA Weblogic
              > official!
              

  • A new session creates auto

    Dear all,
    We are on Oracle 11gR2, some of our developers ran one query and it is taking huge cpu resources, I tried to kill the session but whenever I kill the session a new session starts automatically. I tried to disconnect session using "ALTER SYSTEM DISCONNECT SESSION 'SID,SERIAL#,@INST_ID' IMMEDIATE" command but here also a new session starts.
    Then I found the spid of the session and killed from OS side but a new session is still creating.
    I checked and found that the query has been running from toad and one of the developer after running the query locked his machine and went back to home.
    Please let me know how it can be solved.
    Also, what changes required from DB side or Application (Client) side to prevent such instances.
    Your suggestions are highly appreciated.
    Regards.

    877938 wrote:
    Dear all,
    We are on Oracle 11gR2, some of our developers ran one query and it is taking huge cpu resources, I tried to kill the session but whenever I kill the session a new session starts automatically. I tried to disconnect session using "ALTER SYSTEM DISCONNECT SESSION 'SID,SERIAL#,@INST_ID' IMMEDIATE" command but here also a new session starts.
    Then I found the spid of the session and killed from OS side but a new session is still creating.
    I checked and found that the query has been running from toad and one of the developer after running the query locked his machine and went back to home.
    Please let me know how it can be solved.pull power plug from PC!
    Turn the PC OFF!

  • I like to keep 2 sessions open, but today a new session opens with blank page and no bookmarks - why?

    I keep a session open pretty much all day but minimize it when I leave so someone else can use a session for whatever they want. Today when I open a new session (while mine is minimized) the page is blank and there are no bookmarks. I can hit the home icon and go to view and see my bookmarks but this is a pain

    Hey mate,
    I was having the same problem. If you upgraded to Lion - apparently there is a 'general tab' in the system preferences that has a box that you need to un check. (The box says something about restoring all last windows from last session)
    If you updated Safari but are not using Lion, here is how to fix it. Simply delete this item fromyour Mac HD and restart Safari.
    [USERHOME]/library/preferences/com.apple.safari.plist
    Hope this helps... It worked for me!

  • Downpayment should only be created with downpayment request

    Hello Experts
    I have requirement that F-48 (Downpayment to Vendors) should only allow payment using downpayment request.
    As of now our users have authorization for F-48. So he forgets to post downpayment using downpayment request. He creates downpayment directly without request. I want to restrict this direct downpayment.
    Please help me, how can I restrict F-48 without downpayment.
    Meena

    Hi Meena,
    Check with your basis team for the tab "New Item" in F-48 for not visible or restrict it by authorization.
    Regards,
    Mukthar

  • Ps CS6 Action problem: New document created with "Preset: Clipboard" is misnamed

    Ps CS6 v13.0.1
    OS X 10.6.8
    In an Action, File > New with "Preset:  Clipboard" ignores the specified document name and uses one of the following names when the clipboard definitely does hold valid content:
    1. The name that was applied by the previous invocation of File > New in a session.
    2. No name if Action is run before File > New has been used in current session.
    Only when the clipboard has no valid content will the newly created document be given the specified name.

    The Color Profile seems to work differently between CS5 and CS6.   In CS5 when I use menu File>New and there is something in the clipboard I see Preset clipboard as the dedault setting and see my current Photoshop color setting profile set in as the color profile. I pasted a ProPhoto selection into the clipboard.  When I do the same in CS6 and use File>New I see Preset Clipboard as the default setting but the color profile is not my Photoshop Color setting its ProPhotoRGB the same as I pasted into the clipboard.  However if I close CS6 down. Then start CS6 and do menu File>New I see Preset Clipboard as the default setting and the corol profile is my Photoshop color setting profile sRGB not ProPhotoRGB that in the clibpoard. So I feel the copy to clipboard from Photoshop triggers something internally to change the profile in CS6 it not something that gets set in the clipboard for the ProPhotoRGB override does not happen if I shut Photoshop down and restart it.
    I think I like the CS6 change. Noel I wrote that for you I want you to know I don't think CS6 is all bad. This change should help one from getting profiles mismatches.  CS6 is still the buggest Phoshop around.  It does not stop working as smuch as it did befor the 13.0.1 update. And when it does there a chance Autosave may save the day. The last Photoshop stop working message I got from windows was when I tried to run a script.  There were no open document so nothing to recover. After terminating CS6 and restarting it the script work without a problem.

  • Template File created in DreamWeaver Looks ok. But when a new file created with this template shows disordered

    I created a template file in DreamWeaver cs5. It is OK. and it looks like this, with Pink box showing the editable region. http://smsoftsolutions.com/downloads/test.jpg
    Now the problem is, when I create a NEW html file from this Template, in the DESIGN view, the template contents are shown in a flowing mode. ie. Absolutely positioned DIVs are showing in a disorderly way, as shown in this screenshot. http://smsoftsolutions.com/downloads/test2.jpg
    When I preview it in browser, it is showing as I expect. But only in the design mode, it is showing in a relatively positioned way.
    Can anyone tell me what I should do in the dreamweaver settings, to show the layout in a WYSIWYG way?

    Hi,
    Thank you for your reply.
    If I post the pages alone, the link to the images will be broken.
    The css files also will be broken.
    The css file should be in the folder css, images should be in the folder home_images, and template file should be in the folder templates.
    The link to three files are:
    1. HTML FILE
    http://smsoftsolutions.com/downloads/t.html
    2. TEMPLATE FILE
    http://smsoftsolutions.com/downloads/vetiver_master.dwt
    3.  CSS FILE
    http://smsoftsolutions.com/downloads/css/vetiver_css.css
    Sincerely,
    Tomy Sebastian
    >

  • When Photoshop CS6 is invoked from PSE 11 Organizer why is a new file created with _edited-1 appende

    I just converted a large PSE 10 catalog to work with a downloaded trial version of PSE 11.  When I brought up the Organizer and clicked on the Editor button I selected Photoshop CS 6.  At that point the Organizer created an image stack with a new file on the top of the stack that had a file name that was the original file name with "_edited-1" appended to the end of it.  Is there any way to avoid this?  For me it is going to create a tedious step to delete the original file and rename the new file after editing.  For probably 98% of my editing I will use only the Adobe Camera Raw editor on my imported raw files (Nikon's .nef).  ACR puts the editing data in a sidecar .xmp file so there's no need to protect the original file from be mistakenly replaced by an edited version.

    That's not a new behaviour : in old versions choosing the external editor did create a copy in a version set.
    I don't have CS6, so I can't be specific, but I wonder why you should open CS6 if most of your images can be edited in ACR. For them, you only need to click 'Done' and that saves the edits in the xmp sidecar file. I guess most of the remaining files could be processed in the PSE11 editor and saved in any image format (jpeg, tiff, psd...). Only a minority would have to be processed in CS6***, and in that case, creating a new copy in a version set seems quite reasonable.
    Edit:
    *** in CS6 or the full ACR version of CS6. In my case, it's very rare that I need the other tabs in ACR.

  • New tabs created with + not useable or closing. Google toolbar interaction!

    Using FF25.0 If I create a new tab by middle clicking on a link on a displayed page it works fine. but if I click on the + at the end of the tab bar then select it and type an URL in: Nothing! And the tab then sometimes has no closing cross, even if the cross is there it will not close.
    If I disable GoogleToolbar the problem goes away. But I need to use GoogleToolbar. I think I've tried all the recommended alternatives but none come close enough to giving me what Google Toolbar does.
    I know Google Toolbar is not supported by Google anymore but if I'm not to be pushed into using Chrome then FireFox needs to support it. I realise it might not be technically easy but I doubt it is beyond the skills of the software engineers. So why not support it?
    I've had to resort to FF21. Unless I hear FF is modified in the next few months to accommodate GoogleToolBar I will have to go to Chrome. Yes I am aware of the security issues of using an old copy, if I wasn't I'd not bother making this post and continue indefinitely with FF21!

    I know it is common for projects and products like this to have resources allocated for new shiny gimmicky features. But that isn't what I think most users want. Products that end up with key features unusable just drive users away.
    Google are unlikely to ever restart support for their toolbar, so:
    I would have thought mozilla would have the resources to support the missing features. In particular storing the bookmarks in the cloud so that users can access them on any computer/phone etc. Storing this sort of information in the cloud is a very in thing to do!

  • New "user" created at every login - settings and files lost

    Hi there,
    I've recently replaced a faulty hard disk, re-installed all applications and restored files from backup. I'm using OS X 10.4.11 and an iBook G4.
    Ever since, every time I login, the computer creates a new user and hence my settings and files are not available.
    My user is called e.g."Jack & Jill", but it creates a new user called "iBook" and moves my "Jack & Jill" user to Macintosh HD > Users.
    I can access everything by finding the old "Jack & Jill" user, but it stuffs up using applications because all the settings are under the Library for "Jack & Jill".
    I have tried copying all the files and settings to the "iBook" user, but when I login next time it creates a new "iBook" user, and re-names the previous one "iBook 1" and moves it to the Macintosh HD > Users directory.
    Upshot is every time I login, it's a major hassle to find all my files and get all the settings right.
    Has anyone heard of this problem before and can recommend a solution?
    Cheers,
    Tertullian

    Hi Tertullian, I've seen this, it usually happens when a users name is renamed, whether you did it or it was a spontaneous event...
    Return to default desktop, apparent "loss" of home directory, (it can happen spontaneously too)...
    http://docs.info.apple.com/article.html?artnum=107854
    Have you tried making a new Admin user & see if that one holds between reboots?

Maybe you are looking for