Can i remove the items in session once timeout

note: i did not mean the session.timeout issue, I mean that I want to remove some of the item which set in the session, once timeout, but the session still.

You could probably use a java.util.Timer with a java.util.TimerTask to do this sort of thing. Here is the API: http://java.sun.com/j2se/1.4.2/docs/api/ That should help you find out how to use the two classes.
I would guess what you could do is create a Timer in the ServletContext. Then, everytime a user adds something to the session, you would create a TimerTask with access to the session and the item name. When the task is due, remove the item from the session and kill the task. You would also want to provide a means of stopping or reseting the TimerTask I would guess, but the details are up to you.

Similar Messages

  • How can i remove the menu item from a menu

    how can i remove the JMenuItem from a JMenu at run time.
    thanks in advance

    This is in JMenu from the api
    void remove(JMenuItem item)
    Removes the specified menu item from this menu.
    You must download the api! it helps a lot!
    You can do that or if you need to access it again just set it visible(false);

  • Can i remove the an app once placed in newstand?

    can i remove the an app once placed in newstand?

    Tap and hold the app until all apps begin to wiggle. you should see an X in teh upper left corner of the app. Tap that.
    If you appear to be unable to delete any apps, it may be that restrictions have been set on the iPad preventing app deletion. Open the Settings app > General > Restrictions to check that.

  • Hi, how are you? I have a question. I bought the ringtone "Dancing Queen" once but it charged me 7 times. How can I remove the 6 other purchases?

    Hi, how are you? I have a question. I bought the ringtone "Dancing Queen" once but it charged me 7 times. How can I remove the 6 other purchases?

    iTunes Store Support
    http://www.apple.com/emea/support/itunes/contact.html

  • How can I remove the Demo Viewer from my MacBook?

    How can I remove the Demo Viewer from my MacBook?

    Drag it to the Trash.
    Uninstalling Software: The Basics
    Most OS X applications are completely self-contained "packages" that can be uninstalled by simply dragging the application to the Trash.  Applications may create preference files that are stored in the /Home/Library/Preferences/ folder.  Although they do nothing once you delete the associated application, they do take up some disk space.  If you want you can look for them in the above location and delete them, too.
    Some applications may install an uninstaller program that can be used to remove the application.  In some cases the uninstaller may be part of the application's installer, and is invoked by clicking on a Customize button that will appear during the install process.
    Some applications may install components in the /Home/Library/Applications Support/ folder.  You can also check there to see if the application has created a folder.  You can also delete the folder that's in the Applications Support folder.  Again, they don't do anything but take up disk space once the application is trashed.
    Some applications may install a startupitem or a Log In item.  Startupitems are usually installed in the /Library/StartupItems/ folder and less often in the /Home/Library/StartupItems/ folder.  Log In Items are set in the Accounts preferences.  Open System Preferences, click on the Accounts icon, then click on the LogIn Items tab.  Locate the item in the list for the application you want to remove and click on the "-" button to delete it from the list.
    Some software use startup daemons or agents that are a new feature of the OS.  Look for them in /Library/LaunchAgents/ and /Library/LaunchDaemons/ or in /Home/Library/LaunchAgents/.
    If an application installs any other files the best way to track them down is to do a Finder search using the application name or the developer name as the search term.  Unfortunately Spotlight will not look in certain folders by default.  You can modify Spotlight's behavior or use a third-party search utility, EasyFind, instead.
    Some applications install a receipt in the /Library/Receipts/ folder.  Usually with the same name as the program or the developer.  The item generally has a ".pkg" extension.  Be sure you also delete this item as some programs use it to determine if it's already installed.
    There are many utilities that can uninstall applications.  Here is a selection:
        1. AppZapper
        2. AppDelete
        3. Automaton
        4. Hazel
        5. AppCleaner
        6. CleanApp
        7. iTrash
        8. Amnesia
        9. Uninstaller
      10. Spring Cleaning
    For more information visit The XLab FAQs and read the FAQ on removing software.

  • How can  I  restrain the user login portal once, in the same time ???

    Hi
    I need to restrain the user can't repeat to login portal ....
    to reduce portal loading
    How can I restrain the user login portal once, in the same time???
    Which attributs in Identity Manager or amconsole I can do it to restrain the user ??
    tks

    Does your portal support anonymous access? If so, make sure you are using the authlessanonymous mode. This mode only creates one session that is shared for all anonymous users. This is much more efficient than anonymous access, which creates a session for each anonymous user.
    I have no other recommendation for limiting users to a single login. In general, web applications do not behave like this. What if a user closes their browser without logging out? Does the user have to wait until the session times out in order to log back in again?
    The same thing is true for users that are mobile. If a user leaves their office without logging out and then attempts to log in with a laptop in the conference room, then access will be denied in your implementation. Users do not expect this type of limitation being built into the system.
    If you are having problems scaling, then you need to look at your architecture and perhaps add some more resources. Also, make sure you are making efficient use of the authlessanonymous access mode as stated above.
    - Jim

  • How can I remove the moon phases from iCal?

    I need to remove ALL the moon phases that appear in iCal 5.0.3. Every time iCloud updates it sends 6 to 10 moon events to my MacBook Pro. Going forward 3 0r 4 months, there are too many moon phases. How can I remove the moon phases from iCal?
    I am on a MacBook Pro 2.2 with 4 GB using Mountain Lion 10.7.5.

    Try:
    items.RemoveAll(s => string.IsNullOrEmpty(s));
    Or you can filter them out using where:
    var noEmptyStrings = items.Where(s => !string.IsNullOrEmpty(s));
    Having fun with custom collections!
    Basics of .NET Collections in C#
    How does it work in C#? - Part 3 (C# LINQ in detail)
    Mark as answer or vote as helpful if you find it useful | Ammar Zaied [MCP]

  • How can i remove the shell case from cath kidston?

    Hi how can i remove the shell case from cath kidston

    Try:
    items.RemoveAll(s => string.IsNullOrEmpty(s));
    Or you can filter them out using where:
    var noEmptyStrings = items.Where(s => !string.IsNullOrEmpty(s));
    Having fun with custom collections!
    Basics of .NET Collections in C#
    How does it work in C#? - Part 3 (C# LINQ in detail)
    Mark as answer or vote as helpful if you find it useful | Ammar Zaied [MCP]

  • How can I remove the Location column from the search results in a .chm file?

    How can I remove the Location column from the search results in a .chm file?
    I generated the file in Robohelp HTML 9.
    As far as I know it's used when you've combined more than one source into the final help file. It is possible (though I don't remember doing it) that I did that once a couple of years ago but now I'm only using one source - the project that's generating the .chm.
    Can anyone tell me how I can remove it?
    Thanks
    Tom

    In Project Setup look at the Window properties. I think you will find Advanced Search is ticked.
    See www.grainge.org for RoboHelp and Authoring tips
    @petergrainge

  • How can i remove the empty sting from IList collection?

    How can i remove the empty sting from IList collection. If i use the code i got  System.NotSupportedException was unhandled exception. How can i achive this?
    IList record = (IList)records;
    int count = record.Count;
    for (int i = 0; i < count;i++)
    bool contains = record[i].Equals("");
    if (contains)
    record.Remove(record[i]);
    Is anyone know, please suggest me.
    Thanks in Advance!

    Try:
    items.RemoveAll(s => string.IsNullOrEmpty(s));
    Or you can filter them out using where:
    var noEmptyStrings = items.Where(s => !string.IsNullOrEmpty(s));
    Having fun with custom collections!
    Basics of .NET Collections in C#
    How does it work in C#? - Part 3 (C# LINQ in detail)
    Mark as answer or vote as helpful if you find it useful | Ammar Zaied [MCP]

  • How to remove the item content from my alert Template (alerttemplates.xml) .

    I have enabled alerts to be send from my enterprise wiki & announcement list. Currently the alert email, will display the item content inside the email (the wiki page content or the announcement list content), which i do not want to have. So is
    there a way to remove the item content , so my alert message contains only the following info such as:-
    Our Group Intranet
    TestItem has been added
    Modify my alert settings
    |
    View TestItem
    |
    View News & Announcements
    |
    Mobile View

    Hi johnjohn123,
    According to your description, my understanding is that you want to change the notification message in the alert template.
    You can edit the ImmediateNotificationExcludedFields and DigestNotificationExcludedFields tags to achieve it. After editing the xml, remember apply the template
    to your site using the command below.
    execute command stsadm -o updatealerttemplates -filename <your modified xml file> -url <your site>
    Also, It is not suggested to edit the alert template directly, I suggest you back up the template firstly before customization.
    More information:
    How to change alert email notification message:
    http://dirkvandenberghe.com/2008/01/08/how-to-change-the-alert-email-notification-message-for-announcements.html
    AlertTemplates schema:
    http://msdn.microsoft.com/en-us/library/office/bb802961(v=office.15).aspx
    Best regards,
    Zhengyu Guo
    Zhengyu Guo
    TechNet Community Support

  • I have extra tracks of the same song,plus extra albums showing of the same album in their relevant lists how can i remove the extra ones safely?.

    Please advise, i have somehow downloaded some extra tracks  of the same songs, plus their relavant albums showing in songs/albums lists on my ipod nano 7th gen,how can i remove the unwanted extra songs/albums  safely. Please note i am a newcomer to using a ipod nano/uploading,downloading music.

    Hi Myketyke,
    Welcome to the Support Communities!
    Since you are syncing your iPod nano to your computer, the best option is to remove the duplicates from the iTunes library on your computer.  Then resync your device.  The article below will show you how:
    How to find and remove duplicate items in your iTunes library
    http://support.apple.com/kb/ht2905
    Cheers,
    - Judy

  • How can I remove the authorize 5 computer from my iTunes?

    How can I remove the authorize 5 computer from my iTunes?

    Deauthorize one computer
    Open iTunes on the computer you want to deauthorize.
    Choose Store > Deauthorize This Computer.
    You might need to show the menu bar to see this option in Windows. In earlier versions of iTunes, you can access this option from the Advanced menu.
    Enter your Apple ID.
    Click Deauthorize.
    If need to deauthorize your computer but you can't access it, you need to deauthorize all computers. After you authorize 2 computers, you'll have the option to deauthorize all computers for your Apple ID. You can deauthorize all computers once per year.
    Deauthorize your computer using iTunes - Apple Support

  • I had a trial version of Pages for 30 days and then purchased the actual software without removing the trial. Now when I try to edit documents and save them it wont because it tells me I am using a trial version.... How can I remove the trial version?

    I had a trial version of Pages for 30 days and then purchased the actual software without removing the trial. Now when I try to edit documents and save them it sometimes wont because it tells me I am using a trial version.... But sometimes it lets me!! How can I remove the trial version? I cannot tell which one I am using when I open it....

    Question asked and answered quite once a week.
    Go to my iDisk (address below)
    and download :
    For_iWork:iWork '09:uninstall iWork '09.zip
    Run it then reinstall the purchased software.
    Yvan KOENIG (VALLAURIS, France)  vendredi 2 janvier 2011 16:21:41
    iMac 21”5, i7, 2.8 GHz, 4 Gbytes, 1 Tbytes, mac OS X 10.6.8 and 10.7.2
    My iDisk is : <http://public.me.com/koenigyvan>
    Please :
    Search for questions similar to your own
    before submitting them to the community

  • How can i view the items i copied in my time capsule and back it to my mac.

    Hi everybody, sorry for my bad english, i´m from Mexico City, i bought the time capsule only for used it like a backup, i made all the steps through time machine and all seems very well, but i don't know how can i view the items i copied and back it to my mac.
    Please Help Me.

    I assumed that you are using Time Machine to make backups to your new Time Capsule (TC) ... correct? If so, then you would normally use the Time Machine interface to locate files that have been already backed up.
    For example, let's say that you had a document in your \Documents folder. For some reason you deleted this file, and then, decided that you still needed it. The "normal" process to retrieve it would be to open the \Documents folder in a Finder window on your Desktop ... then open the Time Machine interface. Once opened, you will be presented with not only that folder, but as many versions of that folder as the number of times Time Machine backed it up. Using the forward/backwards (in time) arrows, you would move to a folder that has the recently deleted file. From there you can easily retrieve the file.
    For more information on how to use Time Machine, either use the built-in help or check out this Apple Support article.

Maybe you are looking for

  • Multiple World clock issues

    I travel from the U.S. to Tokyo and other Asian cities on a regular basis. Thus, have set a number major cities clocks. Problem is, They were entered in a random fashion as I visted each location. I would like to arrange them in a time zone sequence(

  • Default text in Purchase Order Header text

    Hi, When i create a PO, only for a specific plant I want a default text description to be captured automatically in the Header Text. How to get this done? Please post your inputs. In case you need any additional info please revert. Thanks, Suresh.

  • How do i get current dateTime in xsl1.0

    Hi, I came to know that current-dateTime() function is working fine with xsl version 2.0 but not in xsl version 1.0 Can anyone suggest me how to get current date time which works fine with xsl version 1.0 and BPEL process manager (OracleApplicationSe

  • 23" CD works, but MB Pro Screen is Dim

    I have a 23" Cinema Display attached to a MacBook Pro. The CD displays perfectly, and I can adjust it's settings. The laptop's display is so dim as to be unusable. I have been able to adjust the brightness levels, but even at maximum, the image on th

  • Which mac should i purchase...please help!!!!! Its my first mac!

    Im in a dilema...I solely want to produce music with Ableton and I will be using Final Cut Pro extensively...im debating on which MAC system to purchase....Im highly interested in the new macbook but im not sure if the laptop will sustain the tasks I