Object not showing up in session after I set it.

I'm running some code that goes through an array of possible forms that could exist in the session. It attempts to pull each form out of session. If the form does not exist then it declares the form and puts it in session. The problem is that after I put the form in session I can't see it or access it. Here is the code I am using. If anyone can tell me what I might be doing wrong.
tralrName="PTEN"
PackageNames.STRUTS_FORM_PKG = "com.xxxxxx.xxxxx.struts.form"
Object trlrObj = session.getAttribute(tralrName + "Form");  
try {
     resetForm(trlrObj, locale);  //this throws an exception if trlrObj is null
} catch (Exception ex) { // In this case tralrName = "PTEN".  When it is getting passed in it is throwing the exception correctly.
     try {
          Object obj =
               Class
                    .forName(
                         PackageNames.STRUTS_FORM_PKG + "."
                              + tralrName
                              + "Form")
                    .newInstance();
          session.setAttribute(tralrName, obj);
          //the above setAttribute line of code appears to work correcty.  the obj is of the correct class and the name is correct.  But when I look in the session the form doesn't exist.
     } catch (Exception e) {
           * @todo Log error message indicating inability to cretae new instance.
}

No offense taken. It does look a little rough.. but for what I'm doing and how I'm doing it I don't think it is going to get much cleaner.
Thanks for the reply, but I had two problems... one I wasn't thinking hashmap and was just looking at each entry.. never checked the next value for each entry...
The other problem that was causing my jsp further down the line to crash when it tried to load the so I thought nonexistent form PTEN was a naming problem.
I was putting the correct object into session and then naming it PTEN... later on I was pulling it from session looking for the name PTENForm. So when I corrected the "Form" it works correctly.

Similar Messages

  • My Iphone5 does not show the picture location after upgrading to ios 7.0.4 - why?

    my Iphone5 does not show the picture location after upgrading to ios 7.0.4 - why?

    I change Settings>Privacy>Location Services>Camera to OFF and then ON and the locations start to appear !!!!.
    It seems to be Apple bug.
    Thanks for you efforts

  • Movie playlist in iTunes is not showing up on iPhone after manually managing syncing and including movies from playlist.

    Movie playlist in iTunes is not showing up on iPhone after manually managing syncing and including movies from playlist.

    Thank you.  This solved my problem too.
    But, one little thing to share:
    "There's an option in settings for Playlists. It was set to Music only. Changed that to All then found the movie playlist under Movies by selecting Genre."
    This is not to be done in iTunes in your computer; this is to be done at your apple TV under "setting". "audio video" "show playlist" "music only/all"
    I am posting this here because I started chat mode with Apple support last night at midnight till 1:30, they didn't know what to do.
    They called me back this morning at 10 am.
    It's not 11:40 they finally know what I am talking about and showed me where to to find the "music only / all" toggle.  My problem is now fixed;
    all these time, they have in front of them a screen shot of your questions and answer but they don't know where to change it from music only to all.
    So, I hope this will save the next victim a lot of time.
    Again, thank you.

  • Some of my earliest photos are not showing on my phone after updating to iOS7. They can be seen in the app "over" which allows for art and lettering to be placed on a photo but I can not find an album for photos before 2012.

    Some of my earliest photos are not showing on my phone5 after updating to iOS7. They can be seen in the app "over" which allows for art and lettering to be placed on a photo but I cannot find an album or year for photos before 2012 (in the photo app). The iphone says the photo content is there when I check in "about" under general in settings. So the pictures seem to be somewhere but I just can't access from from the photo app. Any suggestions. I also know that they were there before the iOS7 upgrade as I was looking for a pre 2012 picture last week and it we there.

    Some of my earliest photos are not showing on my phone5 after updating to iOS7. They can be seen in the app "over" which allows for art and lettering to be placed on a photo but I cannot find an album or year for photos before 2012 (in the photo app). The iphone says the photo content is there when I check in "about" under general in settings. So the pictures seem to be somewhere but I just can't access from from the photo app. Any suggestions. I also know that they were there before the iOS7 upgrade as I was looking for a pre 2012 picture last week and it we there.

  • BPEL Processes are not showing in BPEL Console after OPMN restart

    Hi All,
    BPEL Processes are not showing in BPEL Console after OPMN restart. It was showing earlier before restart.
    Can some one help on this?
    Thanks

    Vikky,
    Are you using 10g?
    If BPELConsole is up but you don't see any process, you can go to the log files and see what is the problem.
    It might relates to permissions, or DB issues etc....
    Arik

  • Music not showing up in library after drag and drop (7.0)

    Music will not show up in library after draging and dropping .mp3's into itunes. Also won't show up if I try the File > Add Folder to Library. The processing files box shows up like its going to work, but it just doesn't. I have tried many differnet mp3's, some actually DID import.
    Also, double clicking on an mp3 will bring up itunes, but it will not load or play the song.
    I currently have 55.5GB of music, and 10,158 songs. Not sure if that has anything to do with it.
    xw8200 HP   Windows 2000  

    Try holding down the Shift key in Windows when launching iTunes. In the resulting dialogue you will get the option to create a new library or navigate to an existing one. The default location for your iTunes library is in \Documents and Settings\Username\My Documents\My Music\iTunes\. Look in there and see if you have more than one library file (they have the extension .itl) If you have more than one try opening them in turn, you may find your original library is still intact: How to open an alternate iTunes Library file

  • My iphone is not showing updates in appstore after ios 6.1 update p.why is this happening....

    my iphone is not showing updates in appstore after ios 6.1 update p.why?

    I have the same problem here, appstore still notice me that an app need to be updated, but when it opened, it wont shown up. Only white blank screen without any loading on update tab in appstore.

  • Folio Overlay Buttons not showing up on Panels after DPS Tool update

    Folio Overlay Buttons not showing up on Panels after DPS Tool update

    You're going to have to do much better as far as describing the problem. A screenshot would be a good start.
    Bob

  • Time machine icon does not rotate and back up icon on desktop does not show during backup session.

    Time machine icon does not rotate and back up icon on desktop does not show during backup session since I installed Maverick.  Why? How do I fix it?

    That's the new look of it. No way to change it other than file a complaint with Apple. If ENOUGH people do thst they may "fix it".
    http://www.apple.com/feedback/macosx.html

  • HT1351 My 2nd generation iPod Nano is not showing my new playlists after syncing (the playlists were created in my computer).  Help!

    My 2nd generation iPod Nano is not showing my new playlists after syncing (the playlists were created in my computer).  Help!

    So, your iPhone (and new shuffle) still work properly with iTunes, correct? 
    Your 1st gen shuffle... It's the white one with USB plug, that looks like a USB flash drive...?
    Are you able to see it in Windows, and maybe change the drive letter back to E:?

  • TS1538 The device do not show at the itune after update at itune

    How to solve the device do not show at the itune after the update thru itune.
    Now the ipad mini keep show the screen on "USB syr to itune"

    Try and turn off iPad and proceed to step 3 of Recovery Mode.
    Recovery Mode
    1. Disconnect the USB cable from the device, but leave the other end of the cable connected to your computer's USB port.
    2. Turn off the device: Press and hold the Sleep/Wake button for a few seconds until the red slider appears, then slide the slider. Wait for the device to turn off.
    3.While pressing and holding the Home button, reconnect the USB cable to the device. The device should turn on.
    4. Continue holding the Home button until you see the "Connect to iTunes" screen. When this screen appears, release the Home button. iTunes should alert you that it has detected a device in recovery mode. Click OK, and then click Restore to restore the device.
    Note: Data will be lost. You may have to repeat the above many times.

  • HT201270 ITunes not Showing iPad and iPhone after IOS7 upgrade.

    ITunes not Showing iPad and iPhone after IOS7 upgrade. I have reinstalled iTuned. Repaired services...etc

    Hey Sliqueg,
    There are a few troubleshooting articles that can help resolve the issue. Check them out here:
    For Windows:
    iPhone, iPad, or iPod touch: Device not recognized in iTunes for Windows
    http://support.apple.com/kb/TS1538
    For Mac OS X:
    iPhone, iPad, iPod touch: Device not recognized in iTunes for Mac OS X
    http://support.apple.com/kb/TS1591
    Sincerely,
    Delgadoh

  • New iphone5 does not show personal hotspot, how do I set it up?

    New iphone5 does not show personal hotspot, how do I set it up?

    First, your carrier must support Personal Hotspot, and second, your account must be provisioned for such. Otherwise, that setting will not appear. So, contact your carrier.

  • ICal 'Show Holidays calendar' not showing holidays in Australia after upgrading to Yosemite.

    Hello, I had been in Italy before moving to Australia and I had set Show Holidays calendar in iCal to display Italian holidays. When I've moved to Australia, I've changed the regional settings to Australia and therefore iCal was showing Australian holidays. After I've upgraded to Yosemite, I can't see any holidays anymore. I tried to uptick 'Show Holidays calendar' and reboot Yosemite, then tick it back and it is still not working for Australia. if I change my regional settings for instance for Italy, it works. It just refuses to display Australian Holidays so for now I'm forced to use Google calendar subscription for public holidays.
    How can I restore the iCal 'Show Holidays calendar' ?

    Hi guys,
    I had this problem too. I resolved it by going into System Preferences  > Language & Region and making sure the primary language was "English (U.K.)" under primary languages (i.e. at the top of the list of preferred languages).
    I always had this set before, but I think upgrading to Yosemite changed this setting to "English" (without the "U.K.) which I guess is a generic "countryless" language. I believe the holidays setting in the calendar needs to know which country's holidays to display.
    Hope this helps this waiting for a fix...

  • Ipod touch will not show up in itunes after update 11.1.14.62

    After updating iTunes to 11.1.14.62 my 3 of my 4 devices will not show up in iTunes.  I have two iPod touch devices, an iPhone 4, and an old iPod Shuffle.  The only one that shows up is the iPod Shuffle.    Everything was fine until this latest update.  I've checked with other people and they're having the same issue.  I have Windows 8.1 64 bit.

    Hello weather1,
    I understand that some of your devices are not recognized by iTunes. The following article may help to resolve your issue:
    iOS: Device not recognized in iTunes for Windows
    http://support.apple.com/kb/TS1538
    Thanks,
    Matt M.

Maybe you are looking for

  • How to Maintain multiple keyfigures in BPC

    Hi, I'm trying to re-produce a IP Planning scenario in BPC. We have a cube with multiple different keyfigures(ex: A,B,C) When we are creating application in applicationset we can create all characteristics of BI cube(IP Scenario) as dimensions in BPC

  • Values of Variables as Object names

    Hi! Can a value of a variable be an object name, and how? For example: String test = "myname"; JLabel myname = new JLabel(); Is it possible to set the object name for the Label from the value of the String test (here: myname) without explicit typing

  • "Photo has Develop adjustments" when none made

    Hello, I am importing a JPG photo into Lightroom 5.4. In the Import screen, in the "Apply During Import" section, both the "Develop Settings" and the "Metadata" fields are set to "None". Yet, as the import process progresses, I see the correct thumbn

  • Evaluation Path to show ALL

    HI, can someone tell me if there is an evaluation path that can show all OU, positions and jobs, even if OU2 belongs to OU1 and only have positions on 2, and jobs on these positions greets

  • Reconfig Server Name and IP Address

    I've installed Solaris 2.4 on a Sun Ultra. I'm required to re-set this up, but I am trying to avoide full installation from scratch. Is it possible to re-set up the parameters that was entered when I first installed it?? I need to actually change the