Question abt session and need advise in designing the project

Hi,
I am developing an application which searches for a particular document in some kind of database and returns the results and when the user clicks on one of the results, it should show the corresponding document from the db. Now I could get that functionality in my app. But my question is right now I am planning to store the document in temp folder and giving it back to the user for a particular session and am going to use a file name specific to the session and particular document for storing the docs.
My questions:
I want to delete the file after the session times out/user closes the window.How do I do that?
And also please advise me if the whole thing is the right approach to achieve the functionality of the application considering the performance issues. I am using JSP and java classes right now.
I am completely a beginner and was asked to develop this application on my own.
Please help me out.
Thanks

javax.servlet.http.HttpSessionBindingListener
or
javax.servlet.http.HttpSessionListener
The former, you have to create a class that implements that interface and store an instance of that class in the session and leave it there. When the session expires, the object is removed and valueUnbound() is called.
The latter, you have to create a class that implements that interface and there's some way in the web.xml format to specify listeners (I forget offhand).

Similar Messages

  • I just ordered a macbook air today and need to know if the 128gb SSD is enough space. I presently have a macbook pro and am using only 30gb hard drive space so, the apple rep said 128 is enough as I do not load much pictures or gaming etc. Also is i5 ok.

    I just ordered a macbook air today and need to know if the 128gb SSD is enough space. I presently have a macbook pro and am using only 30gb hard drive space so, the apple rep said 128 is enough as I do not load much pictures or gaming etc. Also is i5 ok.

    Id choose the I5 yes, depends on what your usage is going to be,
    ....your question about "128 gig being enough" begs the question for IDEALIZED USE of your macbook AIr
    In the case of a Macbook Air with ‘limited’ storage on the SSD, this distinction becomes more important in that in an ever rapidly increasing file-size world, you keep vital large media files, pics, video, PDF collections, music off your SSD and archived on external storage, for sake of the necessary room for your system to have free space to operate, store future applications and general workspace.  You should never be put in the position of considering “deleting things” on your macbook SSD in order to ‘make space’.
    *Generally, unless you NEED the data at least once every few weeks or once a month,...it really does'nt NEED to be on the SSD of your Macbook Air.
    Professionals who create and import very large amounts of data have almost no change in the available space on their computers internal HD because they are constantly archiving data to arrays of external or networked HD.
    Or in the case of the consumer this means you keep folders for large imported or created data and you ritually offload and archive this data for safekeeping, not only to safeguard the data in case your macbook has a HD crash, or gets stolen, but importantly in keeping the ‘breathing room’ open for your computer to operate, expand, create files, add applications, for your APPS to create temp files, and for general operation.
    Ive got more APPS than any human should have on my 128gig AIR,..(50 or so),....and 10gig of working data, important files etc etc.
    Still have 82gig available....... the entire point is that someone shouldnt consider the Air a "storage device" for tons of pics, music, vids, etc.
    *Never consider any computer a data storage device at any time under any circumstance, rather a data creation, sending, and manipulation device. Anyone who thinks data is safe on any computer, even copied upon multiple partitions is making a mistake that will, without fail, strike.
    For needs of packing around a LOT of "big data" with your Air in its case..., get a nice 1TB HD for $70, or even a 2TB drive not much bigger.
    Perfect 2TB HD, very slim, the "little giant"   made by Toshiba (have several of these) $119
    http://www.amazon.com/Toshiba-Canvio-Connect-Portable-HDTC720XK3C1/dp/B00CGUMS48 /ref=sr_1_4?s=electronics&ie=UTF8&qid=1379182740&sr=1-4&keywords=2tb+toshiba
    *This one is the BEST  external HD available that money can buy:
    $75
    HGST Touro Mobile 1TB USB 3.0 External Hard Drive
    http://www.amazon.com/HGST-Touro-Mobile-External-HTOLMX3NA10001ABB/dp/B0062FZ2WS /ref=sr_1_1?s=electronics&ie=UTF8&qid=1379185002&sr=1-1&keywords=hitachi+extern a l+hard+drive

  • I want to disable "restore previous session" and enable "History record" at the same time.

    I want to disable "restore previous session" and enable "History record" at the same time.
    Because I don't want others to access my account such as "Gmail", "Facebook". But I want firefox to record my browsing history.
    What should I do?

    I managed to remove the "Restore Previous Session" button from the home page by changing my default home page with this : www.google.com/firefox/ (the default home page from the previous versions of Firefox). It worked for me, I hope it works for you too.

  • We have been loyal Verizon customers for about six years and need someone to investigate the amount of stress we have been put through by them in the last two or three weeks!HELP!Who do we go to?

    We have been loyal Verizon customers for about six years and need someone to investigate the amount of stress we have been put through by them in the last two or three weeks!HELP!Who do we go to?

    What problem are you having with your service or device? (Removed)
    Message edited as required by the Verizon Wireless Terms of Service
    Message was edited by: Admin Moderator

  • I accidentally deleted my Acrobat 9 from my MAC and need to reinstall but the install file isn't there.

    I accidentally deleted my Acrobat 9 from my MAC and need to reinstall but the install file isn't there.

    That is the gmail server which has nothing to do with your iphone or Apple.
    contact gmail.

  • 10 laksh records and need to find out the top5 salary

    Hi,
    I have emp table with 10 laksh records and need to find out the top5 salary.I formed the below mentioned query,
    SELECT ROWNUM,SAL,EMPNO,ENAME,DEPTNO FROM(SELECT ENAME,EMPNO,
    DEPTNO,SAL FROM EMP ORDER BY SAL DESC) WHERE ROWNUM<=3 AND SAL IS NOT NULL;
    i would like tune this query or anyother new qeury find out top5 salary.
    By
    Siva

    kn_sivaraman wrote:
    Hi,
    I have emp table with 10 laksh records and need to find out the top5 salary.I formed the below mentioned query,
    SELECT ROWNUM,SAL,EMPNO,ENAME,DEPTNO FROM(SELECT ENAME,EMPNO,
    DEPTNO,SAL FROM EMP ORDER BY SAL DESC) WHERE ROWNUM<=3 AND SAL IS NOT NULL;
    i would like tune this query or anyother new qeury find out top5 salary.
    By
    SivaWhy do you need to Tune? What do you need to tune?
    What is the execution time of the query? What is the explain plan?
    Moreover, in an International forum, refrain from using Locals. 10 Lakhs = 1 Million.
    Do provide the above details to determine if your query needs tuning?
    Below is a correct version of Top N query. Untested for your example. Please do modify according to your needs.
    SELECT ROWNUM,
      SAL,
      EMPNO,
      ENAME,
      DEPTNO
    FROM
      (SELECT ENAME,EMPNO, DEPTNO,SAL, dense_rank() over(order by sal desc nulls last) dr
        FROM EMP ORDER BY SAL DESC
      ) a
    WHERE a.dr <= 5;Regards,
    P.

  • Please, I am in a very big problem I designed the project by Adobe director And you test the software on the computers on Windows and works with high quality When I tested the project on Apple Macintosh operating system, Li appeared a number of problems

    Please, I am in a very big problem
    I designed the project by Adobe director
    And you test the software on the computers on Windows and works with high quality
    When I tested the project on Apple Macintosh operating system, Li appeared a number of problems and you dissolve a large part of them
    But I have a problem too big
    The project works on some devices and others show me messages mistakes and why chasm different operating system version
    Apple's Macintosh and these messages
    "biosegnatures" can't be opened becouse it 's from undefined developer "
    others
    shokwave player error
    pleas what can i do

    Welcome to the Support Communities.
    m.raslan wrote:
    I tested the project on Apple Macintosh operating system
    Click on the  menu at top left of your screen, choose About This Mac and, in the panel that appears, note the Version no. in the form 10.n.n. Then update your product list so we can see what version of OS X you're running on the Mac — see this tutorial:
    Update your product list
    m.raslan wrote:
    "biosegnatures" can't be opened becouse it 's from undefined developer "
    This Apple doc may help:
    OS X: About Gatekeeper
    m.raslan wrote:
    shokwave player error
    Is Shockwave Player installed?...
    http://www.adobe.com/shockwave/welcome/
    ...If not, get it here:
    http://get.adobe.com/shockwave/

  • HT3939 I got a new computer and need to down load the desktop application to be able to plug my Iphone into for updates. where can I go to get this application?

    I got a new computer and need to down load the desktop application to be able to plug my Iphone into for updates. where can I go to get this application?

    Click Itunes at the top of this page and download itunes.

  • I AM USING PREM PRO CC2014 AND LOSING ALL SAVES FROM THE PROJECT WHEN i EXIT AND LATER OPEN UP PPRO

    I am at wits end as to why three times i have lost all saved info from a Premier Pro cc 2014 project.
    If I exit Prem pro and come back later, reopen the project , all I get is the old project with no saves, all changes (hours worth) absolutely $#@#$* gone.
    This is the third time !!!! I updated Prem pro about two weeks ago. Have not done any editing since the update,  start of this week, now having major problems.
    I save the work constantly, Is anyone having similar issues as this has never happened before 

    Make a new project and import old one into this new one.
    See if you can find a up to date Auto Save.
    Also make a habit of 'Save A Copy' to a different drive after each edit session. Save A Copy does not overwrite after so many times as Auto Save does.

  • Trying to make a dvd from a project and this error message appears .The project could not be prepared for publishing because an error occurred. (-2125)

    Trying to make a dvd from a project and this error message appears .The project could not be prepared for publishing because an error occurred. (-2125)

    Hi
    Error -2125
    OK Error code - 2125 usually indicates that the movie is to large.
    It use to pop up when going to iDVD !
    iDVD - DO NOT CARE ABOUT Gbs at all. I got movies on 500Mb that do not fit and 50Gb that fits nicely.
    iDVD - ONLY CARES ABOUT - Duration. Duration is Movie time + MENU TIME. Choice of
    menu and animation of this can take lost of "DURATION" 15 minutes or even more.
    Choice of encoding method and use of SL or DL DVDs determine the DVD limit.
    iDVD 08 & 09 & 11 has three levels of qualities.
    iDVD 6 has the two last ones
    • Professional Quality (movies + menus up to 120 min.) - BEST
    • Best Performances (movies + menus less than 60 min.) - High quality on final DVD
    • High Quality (in iDVD08 or 09) / Best Quality (in iDVD6) (movies + menus up to 120 min.) - slightly lower quality than above
    DL DVDs can store about double of these times.
    ALTERNATIVE - The Error Code can indicate that free space on Start-up (BOOT) hard disk is
    less than 25Gb (my minimum)
    calbe - wrote
    If you are getting OSStatus error -2125, I've seen this caused by the computer display sleep settings.
    Try changing the sleep settings to never and see if you are able to export.
    Yours Bengt W

  • How costs and revenus are assigned to the projects

    Hello,
    Can somebody elaborate me how costs and revenus are assigned to the projects?
    Thanks

    It’s great. Thank you so much Vivek for this widget.
    Le 8 janv. 2015 à 22:36, VivekPassan <[email protected]> a écrit :
    http://widgets-musethemes.businesscatalyst.com/tb032.html <http://widgets-musethemes.businesscatalyst.com/tb032.html>

  • Licensing question: Intermingling TLP and Retail Licenses of Design Standard 6

    Hey everyone,
    I have a VDI environment where users are running Creative Suite Design Standard 6 on a non-persistent virtual desktop pool. CS6 is installed directly on the desktop image. I have 5 seats under our TLP agreement with the same serial number, and 5 users.
    Our company recently did a few acquisitions and onboarded some new users. These users run Creative Suite 6 DS as part of their job, and as part of the absorption we're bringing them into the VDI farm. Problem is, the existing copies their previous employer bought them were not under a TLP/volume license. Each user has their own serial number.
    Will I be in trouble with Adobe if I take those retail copies of CS6 away from them, put them on a shelf, and added these users to the virtual desktop pool mentioned above? (This would mean they'd now be using our volume serial.)
    Alternatively, is there any way to take a retail serial number and put it under the umbrella of our TLP/volume license?
    Thanks!

    Hi Red-Helix,
    Unfortunately there is no way to convert retail key to Volume. In order to add these user in virtual desktop pool you will have to purchase more volume seats as per the usage.

  • Question about scrolling and Movie Clips Loaded from the Library

    I hope I am posting this in the right forum.
    Ok, I'm using actionscript 2.0, and I am trying to make a scrolling image gallery. I have a movie clip with three layers. the first contains a movie clip used as a scroll bar. The second is a mask used to hide the overflow content, and the third contains movie clip thumbnails. when I click one of the thumbnails, it loads a symbol containing a larger version of the picture over top of the thumbnails on the same layer. My problem is, the large image is added at the very top of the movie clip, even when it is scrolled out of sight. I want it to appear in sight, so the user doesn't have to scroll all the way back up to the top to see it. This is annoying and confusing. Is there a way to do this?
    Here is the code I used to create the scroll effect (there is actually a whole lot more to the code but it is very long, so I am not adding it now. I will if it is needed though) 
    (Oh, and there is no text involved in this. I just got this code off a tutorial and I haven't changed the variable names yet)
        var scrollUpper:Number = 58;
        var scrollLower:Number = 309;
        var textLower:Number = 60;
        var textUpper:Number = -179;
        var scrollRange:Number = scrollLower - scrollUpper;
        var textRange:Number = textLower - textUpper;
        var startY:Number = imagesHolder_mc.thumbs_mc._y;
        function scroll(){
           var moved:Number = imagesHolder_mc.scroller_mc._y - scrollUpper;
           var pctMoved:Number = moved/scrollRange;
           var textMove:Number = pctMoved*textRange;
           imagesHolder_mc.thumbs_mc._y = textLower - textMove;
        imagesHolder_mc.scroller_mc.onPress = function(){
           this.startDrag(false,this._x,scrollUpper,this._x,scrollLower);
           this.onMouseMove = scroll;
        imagesHolder_mc.scroller_mc.onRelease = scroller_mc.onReleaseOutside = function(){
           this.stopDrag();
           this.onMouseMove = null}

    Thanks for your reply. I'll try to explain it better. I have a long, vertically scrolling movie clip. This movie clip contains lots of thumbnails. When I click a thumbnail, the full sized image is loaded from the library and displayed within the same movie clip. when I click the full size movie clip, it disappears again, and I can click another thumbnail to display another full size image. So I'm not just adding more and more stuff to the gallery if that's what you were thinking. I'm just clicking thumbnails to display the full size image so I can look at it, closing it, and moving on.
    But the full sized image is fixed at the very top of the scrolling movie clip, so if I click a thumbnail at the very bottom, I have to scroll all the way back up to the top to see the full size image. I just want the full size image to appear on screen no matter how far down I have scrolled to click a thumbnail.
    I made my basic gallery useing this tutorial:
    http://flashexplained.com/actionscript/making-the-ultimate-dynamic-image-gallery-in-flash- 8/
    if you want to take a look at that, to get an idea of what I'm talking about.
    Now I'm just trying to add some scrolling functionality, which wasn't included, but I don't really understand actionscript well enough to do this easily on my own.
    Sorry for the long reply. I hope this is clearer.

  • Just bought imac5.1 and needing os. which is the best for this model? only 2gb of ram

    Just bought imac 5.1 2gb ram need os which is the best to run?

    Here are the specs for your machine:
    http://www.everymac.com/systems/apple/imac/specs/imac-core-2-duo-2.16-20-inch-sp ecs.html
    I'd suggest purchasing a retail Snow leopard disk at the Apple store; it is a very stable system and will run well on 2 GB RAM.
    http://store.apple.com/us/product/MC573Z/A/mac-os-x-106-snow-leopard

  • Music pauses and needs double click at the remote to go on

    I walk my dog 3 times a day, and I always do it whilst listening to music on my Iphone 3GS.
    At the beggining I did not have this problem, but all of the sudden it started to happen.
    The first time I play music once I'm on the street (specially if there was a restart before) it's fine, but if I manually pause the music with the clicker, after I unpause it begins to do random pauses in the music. It could take 5-20 seconds or even more than a minute to do so. And to unpause it, I have to click once, I hear music for about 0.2 sec, it gets paused again, and only with the second click it gets really unpaused.
    After this happens 2 or 3 times in the same walk, the next unpause makes the music start to sound all cracked up and I have to disconnect the jack and put it back on. That solves it momentarily. If I pause manually again, it all re starts.
    But the crazy thing compared to everyone else having issues with music randomly stopping, is that I always need to press the clicker twice to playback.
    Note: I pause the music manually many times because I cross other people's dogs and I start chatting with them.
    Music never skips, only pauses.
    I have changed headphones without any luck.
    I went from a 3.x firmware (don't remember which one I had) to 4.3.1 with the same results.
    I have tried listening to music with no applications at all loaded into memory except the ipod.
    Shake to shuffle is of course off.
    I have tried another application to play the music with the same results (but I think these apps really use the ipod app to actually play music).
    I have cleaned the jack with q-tips, air etc.
    I'll aprreciate if anyone can shed some light to this problem.
    Cheers!

    Restore your iPhone and sync the music onto it again. Because it's jailbroken, there is no other way to isolate the problem.
    Post if the issue persists after the iPhone has been restored.

Maybe you are looking for