How to invalidate session in absence of activity

hello ppl
i hav a prob...i want to invalidate my session if no activity happens on my screen for a specified period...how do i
chk the time and also how do i track my activity....
i also need to display a prompt to the user informing of the time expiry and need a response from him
can anybody help me out with this?????

BalusC wrote:
Hari.Rangarajan wrote:
hello ppl
i hav a prob...i want to invalidate my session if no activity happens on my screen for a specified period...how do i
chk the time and also how do i track my activity....It happens automagically when the session times out according to the appserver's default setting (usually 30 minutes) or your setting in the web.xml as suggested before.
i also need to display a prompt to the user informing of the time expiry and need a response from himHTTP disallows push, so forget about it. Best what you can do is to use Javascript's setTimeout() function in combination with HttpSession#getMaxInactiveInterval(). This way you can use Javascript to show some message in the page when the session is timed out.I'm afraid that wass what was explained under the URL(Earlier Post) which was what metioned in my earlier reply.
Why are repeating the same solution out here ??

Similar Messages

  • How to invalidate session ids

    dear all ,
    Any knows how to invalidate the session ids .
    Ex . Server maintains maintains many client session ids
    I want invalidate those client session ids ,,,'

    There are several cases when a session is invalidated:
    1. when the time specified in web.xml elapsed (session-timeout tag) - this is specified for the entire server
    2. when using session.setMaxInactiveInterval. specs:
    "Specifies the time, in seconds, between client requests before the servlet container will invalidate this session."
    3. when you call session.invalidate() specs: " Invalidates this session then unbinds any objects bound to it." With this, the session is immediately invalidated.

  • How to invalidate session when i browse another url with out closing browse

    Hi,
    How can i find when i type another url and browse to that site without closing the browser.when i left the site i have to invalidate the session.
    how can i recognise this event.
    thanks

    You might be able to do this by catching a javascript event, then you'd need to submit a request back to the server before any session invalidation could occur. Basically, the server never know when the user is gone - that's why there's a timeout in sessions. The only other way is to have a logout button that the user clicks on to send the request to invalidate the session.

  • How to invalidate session in JSP?

    I am new to web development.
    I have tried to invalidate a session with session.invalidate() but this does not seem to have invalidated the session. Any Help Please??

    please elaborate on your problem,
    session.invalidate(false) should work..false means, if there is a session, invalidate, if not..DONT create one...

  • How to invalidate session after some time

    How can I assign null value to session if user does not interact with the jsp page uptill M minutes. (Here M is variable, say after 5 minutes)

    use setMaxInactiveInterval(int) method of HttpSession class.

  • Invalidate session in another context

    Hi everyone,
    In a nutshell, how to invalidate session of another context residing in another server?
    If it is not possible, what is the best approach to achieve something similar to that?
    Thanks for reading this.
    Z

    u can as well use the MBean interface implementations for Tomcat (JBoss)
    and call some public method of a MBean under name "jboss.web:type=Manager,path=/,host=localhost,*" - like 'expireSession' passing the sessionId string as param
    Rafal Baton Zaczynski
    http://baton.pop.e-wro.pl - Java/JSF/JavaScript - tips&tuts

  • How can I get a list of active savepoints for the current session?

    Hi,
    In Oracle Applications, we are getting the following error while performing ROLLBACK to a Savepoint.
    "Unexpected Error: ORA-01086: savepoint 'PTNR_BULK_CALC_TAX_PVT' never establishe d ORA-06510: PL/SQL: unhandled user-defined exception"
    So how can I get a list of active savepoints for the current session?
    Could you please also let me know if there is any better way to debug this issue.
    Appreciate any quick response as the issue is very critical.
    Thanks,
    Soma

    user776523 wrote:
    Hi,
    In Oracle Applications, we are getting the following error while performing ROLLBACK to a Savepoint.
    "Unexpected Error: ORA-01086: savepoint 'PTNR_BULK_CALC_TAX_PVT' never establishe d ORA-06510: PL/SQL: unhandled user-defined exception"It sounds like there's an execution path in the code where the SAVEPOINT is never issued.
    There is no way to get a list of active savepoints. Is this your code or a "canned" procedure? If it is your code you can go through the code looking for answers, possibly tracing execution using DBMS_OUTPUT.PUT_LINE or writing messages to a log table. If its a "canned" procedure you may need to open an SR with Oracle

  • How to invalidate a session based on the session id

    How to invalidate a session based on the session id

    You have to write your own support for this.
    It used to be in the API, but was deprecated as a security hole.
    The best way to do it is implement a session listener (javax.servlet.http.HttpSessionListener) which notifies you when sessions are created/destroyed.
    You can then keep a map of sessions in your own code, indexed by session Id, and access any/all of them to invalidate as you choose.

  • How can a session have an ACTIVE status with a WAITING state

    Hi all,
    I would like to know the difference between status and state of a session ?
    The documentation says :
    for status ACTIVE : Session currently executing SQL
    for state WAITING : The session is currently waiting...
    How can a session execute a SQL statement and be waiting at the same time ?
    Regards,
    fcjunic.

    Hi fcjunic,
    It's really not paradoxical, once you understand the definition of the terms.
    First, we have V$SESSION.STATUS, which can be ACTIVE or INACTIVE. A session is ACTIVE if it's in a database call. So, think of this from the client side point of view. A session does a parse call, or an execute call, or a fetch call, etc. For the duration of that call, till control returns back to the client, that session is said to be ACTIVE.
    From the time the calls returns, till the time of the next call, the session is INACTIVE.
    Next, we have V$SESSION.STATE. This is probably more useful to think of from the server process point of view. This refers to whether the server process is currently running, i.e. on the CPU, or WAITING, i.e., waiting on a resource. Possible values for this column are WAITING, WAITED KNOWN TIME, WAITED SHORT TIME, and WAITED UNKNOWN TIME. Of those possibilities, a session is only actually waiting if STATE is WAITING. All the other values mean that it's no longer waiting, but is running on CPU.
    A session w/ STATUS of INACTIVE, will always be in STATE of WAITING, waiting on the 'SQL*NET message from client' wait. So, in that case, it means the server process is waiting around for work to do. It's in between calls, so, STATUS is INACTIVE, and it's waiting on that network port, to receive the next call from the client.
    An example of a session that's ACTIVE and has STATE of WAITING, would be a session that's, for example, doing a full table scan. So, it's got lots of data to read from disk. While the session waits for the read from disk to complete, the session waits on 'db file scattered read'.
    Finally, for completeness, the difference between the different possible values of the STATE column. I already covered WAITING. If a session is not waiting, it's now on CPU, and it previously waited. If so, it either waited more than 10 ms, in which case it will report WAITED KNOWN TIME, or less than 10 ms, in which case it reports WAITED SHORT TIME, or timed_statistics is false, in which case this column will always be WAITED UNKNOWN TIME. Also, it's important to pay attention to this column, when trying to interpret the WAIT_TIME and SECONDS_IN_WAIT columns.
    See here:
    http://download.oracle.com/docs/cd/E11882_01/server.112/e10820/dynviews_3016.htm#REFRN30223
    for more information.
    Hope that helps,
    -Mark

  • How can i invalidate Session when a browser crashes?

    Hi
    How can i invalidate session when a browser window closed or crashed unexpectedly.
    If user closed the browser window using File->Close, then i'm calling javascript function .... and it is working fine. But when browser window is hanged and closed using ENDTASK, how can i kill that session.
    Please help
    Thanks
    -Vidyadhar

    Well you can't. Execution halts, so anything you would want to do is made impossible: that's why crashes are the #1 enemy of any software developer (that and impossible deadlines). The webserver will remove the session manually when it times out though.

  • 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 help

    i 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 to invalidate the IPortalComponent Session

    Hi,
    I have written one portal component for customizing the session expiry. In this component, based on certain idle time we want to redirect to another customize page saying that session is timed out. Redirection is happening but session is still alive. I want to invalidate the session.
    Can somebody tell me that <b>how can I invalidte the IPortalComponent session</b>. I know how to invalidate the http session but that does not solve my problem.
    Any suggestion?
    Thanks in advance.
    Manish

    Hi,
    By looking at the code of the IPortalComponentSession one can see that it basically stores all values in the httpsession with a certain prefix. Therefore, shouldn't it be sufficient to invalidate the httpsession ? (if this is not the case could you describe the problem closer)
    Note that if there is not component session, the IPortalComponent request creates one the first time it is accessed.
        public IPortalComponentSession getComponentSession()
            if(mm_componentSession == null)
                mm_componentSession = new PortalComponentSession(this);
            return mm_componentSession;
    Dagfinn

  • Is it possible to invalidate session when I click my browsers back button

    Hai
    I have a question.
    I am building a jsp page with multiple forms.As of now,
    no login system has been implemented.
    I need my session to time out when the client click on the back
    button on the browser to prevent data corruption.
    Is there a possible way to do this in Java/ Script
    I know the use of session.invalidate() but how to tie it up to the
    browser's back button
    A second problem
    If I use session.invalidate() on Tomcat 3.2
    I find that it is not invalidated.But this same function on tomcat 4
    doesn't have any problem
    Could anyone help on these issues
    Thanks

    You don't mean you want to invalidate session every time you move to a new page, do you? If you do, after implementation of login system the users will be asked for passwords at each page. If you don't, it's better to use headers for your response.
    response.setHeader("Cache-Control", "no-cache");
    response.setHeader("Expires", "-1");

  • How to pass session variable value with GO URL to override session value

    Hi Gurus,
    We have below requirement.Please help us at the earliest.
    How to pass session variable value with GO URL to override session value. ( It is not working after making changes to authentication xml file session init block creation as explained by oracle (Bug No14372679 : which they claim it is fixed in 1.7 version  Ref No :Bug 14372679 : REQUEST VARIABLE NOT OVERRIDING SESSION VARIABLE RUNNING THRU A GO URL )
    Please provide step by step solution.No vague answers.
    I followed below steps mentioned.
    RPD:
    ****-> Created a session variable called STATUS
    -> Create Session Init block called Init_Status with SQL
        select 'ACTIVE' from dual;
    -> Assigned the session variable STATUS to Init block Init_Status
    authenticationschemas.xml:
    Added
    <RequestVariable source="url" type="informational"
    nameInSource="RE_CODE" biVariableName="NQ_SESSION.STATUS"/>
    Report
    Edit column "Contract Status" and added session variable as
    VALUEOF(NQ_SESSION.STATUS)
    URL:
    http://localhost:9704/analytics/saw.dll?PortalGo&Action=prompt&path=%2Fshared%2FQAV%2FTest_Report_By%20Contract%20Status&RE_CODE='EXPIRED'
    Issue:
    When  I run the URL above with parameter EXPIRED, the report still shows for  ACTIVE only. The URL is not making any difference with report.
    Report is picking the default value from RPD session variable init query.
    could you please let me know if I am missing something.

    Hi,
    Check those links might help you.
    Integrating Oracle OBIEE Content using GO URL
    How to set session variables using url variables | OBIEE Blog
    OBIEE 10G - How to set a request/session variable using the Saw Url (Go/Dashboard) | GerardNico.com (BI, OBIEE, O…
    Thanks,
    Satya

  • How to use session in webservice?

    In C#, can use session variable in a webservice object.
    How to use session in Java webservice?
    Who can give me a example?
    Thanks a lot

    Did I use session in a wrong way?No, you are using the session correctly. The code looks fine.
    Check
    - your spelling of the attribute names - obviously they must match
    - the ids of the sessions you get both times: session.getId(). If they have different ids, then most probably the session is being lost somewhere.
    There are a number of reasons to lose a session. If you close the browser, invalidate the session in code, or lose the cookie recording the id. This happens when you change from https to http, so a session can be lost that way.
    The session is normally maintained by session cookies. If you close your browser you lose the cookie. If you have disabled cookies on your machine then it also might not work.
    In cases such as that you should be using the method response.encodeURL() to maintain the session for you in any hyperlinks you produce. Struts normally handles that for you though if necessary.
    Hope this helps,
    evnafets

Maybe you are looking for

  • Unable to Print a Web Services Information Sheet to Obtain a Claim Code

    I'm trying to add a HP LaserJet Pro 200 color MFP m276nw as an ePrint device.  I've successfully updated the printer firmware.  When I enable the web services the Print Information Sheet button appears, but nothing prints when I click it and I'm unab

  • Multiple objects for a Parallel Effects Object?

    I'm essentially trying to figure out how to have two object animate at the same time. My effects and parallel object are dynamically created in AS3... private function slider(_target1:mx.core.Container, _target2:mx.core.Container):void{ var slideEffe

  • Error when deploying composite with BPEL

    We are trying to deploy a composite with a BPEL component (in the Enterprise Manager) but it fails with this error: Error deploying BPEL suitcase. error while attempting to deploy the BPEL component file "/oraclesoa/Middleware/user_projects/domains/M

  • Starting Multiple Meetings

    Hi !!! Can any one please give me procedure to start multiple meetings with single flash file using flash media server components. Let me explain clearly---- I started a meeting with flash media server components and deployed to tomacat. I can able t

  • CC app has a yellow and blue shield on it and the app does not show all my apps.

    When I click on the app, it does not show all  assets I have and does not show the listing of all the assets and their status. How can I correct this? Vij