How to remove an object from session with JSF 2.0 + Faceletes

hi all,
I have a facelets page which calls a backing bean of session scope. Now when ever i click on this page i want the existing bean object to be removed from the session . In my existing jsp i have a logic something like this to remove the object from session
     <% if (request.getParameter("newid") != null) {
          request.getSession().removeAttribute("manageuserscontroller");
%>
Now i have to refactor my jsp to use facelets and i should not be using scriplets anymore . I did try with JSTL but the <c:remove> tag is not supported by facelets.
Can someone help me how can i refactor this code to work for my facelets?
I really appreciate your help in advance
Thank you

r035198x wrote:
Redesign things so that the remove is done in a backing bean method rather than in a view page.Exactly that. I tend to cleanup session variables at the start and at the end of a page flow; generally the end is some sort of save or cancel action being invoked through a button but that is application specific.

Similar Messages

  • How to read appended objects from file with ObjectInputStream?

    Hi to everyone. I'm new to Java so my question may look really stupid to most of you but I couldn't fined a solution by myself... I wanted to make an application, something like address book that is storing information about different people. So I decided to make a class that will hold the information for each person (for example: nickname, name, e-mail, web address and so on), then using the ObjectOutputStream the information will be save to a file. If I want to add a new record for a new person I'll simply append it to the already existing file. So far so good but soon I discovered that I can not read the appended objects using ObjectInputStream.
    What I mean is that if I create new file and then in one session save several objects to it using ObjectOutputStream they all will be read with no problem by ObjectInputStream. But after that if in a new session I append new objects they won't be read. The ObjectInputStream will read the objects from the first session after that IOException will be generated and the reading will stop just before the appended objects from the second session.
    The following is just a simple test it's not actual code from the program I was talking about. Instead of objects containing different kind of information I'm using only strings here. To use the program use as arguments in the console "w" to create new file followed by the file name and the strings you want save to the file (as objects). Example: "+w TestFile.obj Thats Just A Test+". Then to read it use "r" (for reading), followed by the file name. Example "+r TestFile.obj+". As a result you'll see that all the strings that are saved in the file can be successfully read back. Then do the same: "+w TestFile.obj Thats Second Test+" and then read again "+r TestFile.obj+". What will happen is that the strings only from the first sessions will be read and the ones from the second session will not.
    I am sorry for making this that long but I couldn't explain it more simple. If someone can give me a solution I'll be happy to hear it! ^.^ I'll also be glad if someone propose different approach of the problem! Here is the code:
    import java.io.*;
    class Fio
         public static void main(String[] args)
              try
                   if (args[0].equals("w"))
                        FileOutputStream fos = new FileOutputStream(args[1], true);
                        ObjectOutputStream oos = new ObjectOutputStream(fos);
                        for (int i = 2; i < args.length ; i++)
                             oos.writeObject(args);
                        fos.close();
                   else if (args[0].equals("r"))
                        FileInputStream fis = new FileInputStream(args[1]);
                        ObjectInputStream ois = new ObjectInputStream(fis);
                        for (int i = 0; i < fis.available(); i++)
                             System.out.println((String)ois.readObject());
                        fis.close();
                   else
                        System.out.println("Wrong args!");
              catch (IndexOutOfBoundsException exc)
                   System.out.println("You must use \"w\" or \"r\" followed by the file name as args!");
              catch (IOException exc)
                   System.out.println("I/O exception appeard!");
              catch (ClassNotFoundException exc)
                   System.out.println("Can not find the needed class");

    How to read appended objects from file with ObjectInputStream? The short answer is you can't.
    The long answer is you can if you put some work into it. The general outline would be to create a file with a format that will allow the storage of multiple streams within it. If you use a RandomAccessFile, you can create a header containing the length. If you use streams, you'll have to use a block protocol. The reason for this is that I don't think ObjectInputStream is guaranteed to read the same number of bytes ObjectOutputStream writes to it (e.g., it could skip ending padding or such).
    Next, you'll need to create an object that can return more InputStream objects, one per stream written to the file.
    Not trivial, but that's how you'd do it.

  • How to remove the Object from memory.

    Hello.
    Flash file that i made with Flex Builder uses memory too
    much.
    Look at the next example source code.
    var testCan:Canvas = new Canvas();
    this.addChild(testCan);
    this.removeChild(testCan);
    testCan = null;
    but just memory usage still goes up, is not freed instantly.
    so if i load the large flash files on my web browser,
    after 5 munites or something, the web browser is down.
    How to remove the object from memory immediately without
    delay?

    It's all about the Garbage Collector ..
    There is a nice write up here :
    http://www.gskinner.com/blog/archives/2006/06/as3_resource_ma.html

  • How to remove unused objects from the webcatalog In OBIEE11g

    Hi,
    I want to delete unused objects from obiee11g catalog, i know in obiee10g it's working fine (i.e: we can do it via manage catalog then delete the unused objects) is there any way to do it automatically like RPD utility --->removing unused objects from Physical layer in RPD
    fyi: I don't want to delete manualy. i need somethink like button/link to find unused objects(report,filter,folder..etc) from my obiee11g catalog.
    Thanks
    Deva
    Edited by: Devarasu on Nov 29, 2011 12:06 PM
    Edited by: Devarasu on Nov 29, 2011 3:15 PM

    Hi,
    Checked with Oracle Support team and confirmed below points
    --> incorporated into the Current product and consider as BUG it may resolve future release
    --> Currently there isnt any automatic method to remove the unused objects like reports, filters,folder etc from catalog.
    Treated as Bug
    Bug 13440888 - AUTOMATICALLY REMOVE OF UNUSED CATALOG OBJECTS FROM WEBCATALOG
    FYI:
    SR 3-4984291131: How to remove unused objects from the webcatalog in obiee11g
    Thanks
    Deva

  • How to remove an object from Buffer Cache

    Hi,
    I have a simple question. How can I remove an object from the Buffer Cache in Oracle 10gR2 ?
    I am doing some tuning tasks in a shared development database, so I can't do "alter system flush shared_pool" because it will affect other people who are running their queries. So I want to remove from Buffer Cache only the objects that I know that I am the only reader. I can see the objects that I want to be removed by querying the V$BH view.
    By the way, I did some "alter system flush shared_pool" and my objects were not removed from the Buffer Cache, and they are not in the "Keep".
    Thanks In Advance,
    Christiano

    Further more, you can use CACHE | NOCACHE on table level to indicate how you want Oracle handle the data blocks of said table.
    http://download-west.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_7002.htm#i2215507
    CACHE | NOCACHE | CACHE READS
    Use the CACHE clauses to indicate how Oracle Database should store blocks in the buffer cache. If you specify neither CACHE nor NOCACHE, then:
    In a CREATE TABLE statement, NOCACHE is the default
    In an ALTER TABLE statement, the existing value is not changed.
    CACHE For data that is accessed frequently, this clause indicates that the blocks retrieved for this table are placed at the most recently used end of the least recently used (LRU) list in the buffer cache when a full table scan is performed. This attribute is useful for small lookup tables.
    As a parameter in the LOB_storage_clause, CACHE specifies that the database places LOB data values in the buffer cache for faster access.
    Restriction on CACHE You cannot specify CACHE for an index-organized table. However, index-organized tables implicitly provide CACHE behavior.
    NOCACHE For data that is not accessed frequently, this clause indicates that the blocks retrieved for this table are placed at the least recently used end of the LRU list in the buffer cache when a full table scan is performed. NOCACHE is the default for LOB storage.
    As a parameter in the LOB_storage_clause, NOCACHE specifies that the LOB value either is not brought into the buffer cache or is brought into the buffer cache and placed at the least recently used end of the LRU list. The latter is the default behavior.
    Restriction on NOCACHE You cannot specify NOCACHE for an index-organized table.
    CACHE READS CACHE READS applies only to LOB storage. It specifies that LOB values are brought into the buffer cache only during read operations but not during write operations.

  • How to remove an object from an article

    Hi all,
    newbie here, sorry. I searched this forum for an answer, but I couldn't find it. So here it is....
    I created a folio with 3 articles. After changing something I always update the article. But sometimes it will upload not only all objects from that article to the digital publishing site, but also objects (files) that are in/from another article. In my case I used a video in article 1, I changed something in article 3 and I updated article 3 to my folio. When uploading object (files) for article 3, I spotted the video I used in article 1!! This video doesn't belong in article 3, I don't use it there. But it will enlarge article 3 quite a bit and with this my entire folio will become much larger, which is completely unnecessary!
    Is there any way to delete parts(/objects/files) from an article that are not really used in the article? Without affecting the rest of the (working) article of course....
    Any help would be appreciated!
    Ton Janssen

    Hi there,
    this seems to do the trick....I put all the HTML files and supporting documents etc for one article in a separate folder and now it seems to work well.....thanks a lot for your help!
    Ton Janssen

  • Remove an object from foreground with lines in background

    The photo says it all.  I'm looking for suggestions on how to remove the street light from the foreground of the image (unfortunately, there was no alternative way to take this shot from my position).  BTW, those are bridge cables in the background and the original is a Canon Raw image.
    Thanks
    Daryl

    You may be able to use the patch tool to do a quick hide of the light not a perfect job or spent a lot of to remove little areas  to do a better job.
    Cloning onto a new layer works well to hide it to for you can trim the clone if you spend some time you can do a much better job then this

  • How to remove an object from a diagram

    Hello,
    Is there are way to remove (cut) an entity from a diagram (sub-view) in Data Modeler? I can only find a delete function which will delete it from the model altogether. I'd like to just remove the entity from the diagram and leave it in the model (and any other sub-views it may be in).
    Thanks in advance,
    Beatriz.

    In my case, if an entity is shown in more than one views, a dialog box is displayed to ask if I want to completely delete the entity (from all views) or just hide it from current view.
    You probably don't have your entity in multiple views. :-)

  • I want to purchase Apature, but In the advertising blurb I dont see how to remove unwanted objects from a photo. I know it can be done in Adobe Elements, but I would rather Apature.

    I want to purchase Apature, but in the advertising blurb I dont see hoe to remove unwanted oblectsfrom a photo. I know it can be done in Adobe but I would rather have Apature.

    What DiploStrat said.
    To expand a little bit:  Aperture allows you to assign a graphics program (such as PSE) as an "external editor".  In general, you use Aperture to organize your photos, to develop them (make them as good as possible for each use), and to publish them (create share-able files).  Your external editor is used when you want to create a new graphics file, which is what happens in all "destructive pixel editing".
    Aperture provides tools to remove sensor spots from skies (and like operations), but for removing people and billboards you'll want a proper compositor, a/k/a a graphics program.

  • How to remove Safari 5 from pc with xp.....add/remove does not work

    Looking for help removing Safari 5 from my PC using XP. Add/Remove program will not uninstall it.

    Welcome to the Apple community.
    If you can't remember the password, reset it at...
    iForgot.com

  • How to remove an object from its background with mocha

    Hello,
    I have th Mocha version that comes along with Adobe After Effects CS5.5. Does this cersion has the remove tool?
    Thank you..

    You can track things, create masks, export the masks, remove backgrounds, and do a bunch of really amazing things with the version of Mocha that comes with AE, you just can't drop a clip into the included version of Mocha and render out a composite. There are also other goodies in Mocha Pro.
    I'd suggest that you go through a fist full of Mocha tutorials. There are a bunch of good ones on the Imagineer Systems site. Try filtering the results by Mocha AE.

  • How to remove an object from an all white background?

    This is what I'm working with, I need to remove the two orbs from the image  so I can duplicate the surrounding (then empty) circle 5 times and paste them over the rest of the background (not seen) for an upcoming YouTube based gaming venture of mine. (I will then merge the background shot with the new layer or layers to meld the circles to the background) For some reason whenever I use the magic lasso to remove these it either punches a hole in the layer (it's not the right shape and I don't want it there yet) or it fills the empty space with blurry nonsense... does this mean my content aware is non responsive or faulty? Or (much more likely) am I doing something wrong? I don't need Photoshop for much more than creating single screen thumbnails in my videos or for borders (in this case this is the latter)... I could technically remove this from my border in Paint, so I'm sure there's a better more professional way to do it in Photoshop... but I am very new to the program, and right now it's not working in the way it was shown to work in the YouTube tutorial I found of the program How to Get Started With Adobe Photoshop CC - 10 Things Beginners Want To Know How To Do - YouTube SOS, even though this is a very small thing I do desperately need to be able to do it for this project to go ahead, any help will be appreciated. It's also worth noting that since I won't be using a lot of the more advanced Photoshop tools, there is no need for me to purchase a tablet yet, so please, none of that...
    For the finished border to work I will need to be able to place tiny 3D video clips behind each or the 6 portholes in order to add some much needed flair to my project.

    Are these the components you need?
    I may have misunderstood.

  • HT1750 How to remove an object from the DVD slot

    I accidentally inserted an SD card into the DVD slot.  Can someone tell me how to safely remove the SD card?Quest

    The solution here also can work for a SD, just flip the Mac over to get the SD to "land" on the card stock.
    https://discussions.apple.com/docs/DOC-3112

  • I am trying to remove an object from a photo such as the back of a person's head.  How do I do this?  I have iphoto '09.

    I am new to iphoto and am trying to figure out how to remove an object from a photo (ie the back of a person's head, or an arm in a photo that seems to belong to no one).  I have iphoto '09.

    You need an external editor for that kind of work.
    In order of price here are some suggestions:
    Seashore (free)
    Graphic Coverter ($45 approx)
    Acorn ($50 approx)
    Photoshop Elements ($75 approx)
    There are many, many other options. Search on MacUpdate.
    You can set Photoshop (or any image editor) as an external editor in iPhoto. (Preferences -> General -> Edit Photo: Choose from the Drop Down Menu.) This way, when you double click a pic to edit in iPhoto it will open automatically in Photoshop or your Image Editor, and when you save it it's sent back to iPhoto automatically. This is the only way that edits made in another application will be displayed in iPhoto. 
    Regards
    TD

  • Remove AP object from WLC

    How to remove AP object from WLC 8500 ?  I had dismantle one AP so it is now no longer associated with WLC, I want to remove AP info from WLC. But unable to find any command for the same.

    Hi Scott,
    Thanks for your answer..  But it's not fulfill my question.  I want to remove some of AP entries which is not currently associated with WLC.
    Below are steps which I understood when new AP joins to controller in my case.
    1) We are configuring AP with static IP and capwap protocol thru console login of AP.
    2) We are connecting AP to WLC thru netwok.
    3) When A joins to controller, It will be visible at Monitor section > Access Point Summary
    4) It will start from AP.macaddress
    5) Now remotely we are applying AP name, HIgh availability and assign to appropriate AP group.
    Now My query is when AP joins to controller, somewhere there should be entry in database that this mac address of AP is joined to controller along with AP configuration. 
    I want to delete some of AP databases which are disassociates from controller due to media failure between AP and WLC/AP no longer available.
    Is there any command to remove AP entries from Controller ? or any other procedure ?
    Devang

Maybe you are looking for

  • Remove custom label in maveriks contacts

    I did some custom labels on iPhone. And now I cannot delete them, not on iphone (ios 7), not on macbook (mavericks) and even iCloud web interface could not help me.

  • Control Inspection Lot Generation

    Hi Experts, I have a requirement where I need to use Inspection Type 04 in 2 ways. 1) For FERT material types inspection lot should be generated automatically. 2) For HALB material types inspection lot should not be generated. The client will generat

  • FAQ: How do I retrieve my Adobe ID name or password? What's an Adobe ID anyway?

    Q: How do I retrieve my Adobe ID name or password? What's an Adobe ID anyway? A: You can retrieve your Adobe ID by going to this page https://www.adobe.com/account/sign-in.adobedotcom.html . Your Adobe ID and password is also used to authenticate you

  • Graphics update = screen-tearing in Safari

    Has anyone else who has installed the Snow Leopard Graphics Update noticed a pronounced screen-tearing effect when scrolling in Safari? The first left 10% of a Safari window appear to be totally out of sync with the rest of the page. UPDATE: The same

  • Database_Connection_JTDS

    HI, This is karthikeyan. I am using this driver(net.sourceforge.jtds.jdbc.Driver) for my ms sql server2000 database and the connection string I used is ("jdbc:jtds:sqlserver://localhost:8080/kkk;user=win;password=win"); My CLASSPATH IS = .;C:\Program