Problem with this piece of jsp

Hi,
I have a problem with this piece of code, and I dont know why is the error caused:
<% String value=(String)session.getAttribute("add");
*if (value.equals("add")) { *  %>
<th>Add quantity</th>
<% } else {  %>
<th>Modify quantity</th>
<% } %>
When I debug Apache Tomcat log gives me the NullPointerException error, in the line underlined in bold, but theorically if the sentence "if" is not true it should enter in the "else" part but it doesn`t do, and I dont have the explanation.
I would be very grateful if somebody could help to solve this problem.
Regards.
Edited by: user1577231 on 04-oct-2010 6:33

If you get a NullPointerException at that point, then that probably means that value is null.
The easiest way to avoid this NPE is to write "add".equals(value) instead.

Similar Messages

  • I  spend good money for my iPhone i have the iPhone 5 with the new charger slot which is smaller. I have been through at least 3 charging cords and this is not acceptable to me. i never had a problem with this on my older phone. apple needs to correct tho

    I  spend good money for my iPhone i have the iPhone 5 with the new charger slot which is smaller. I have been through at least 3 charging cords and this is not acceptable to me. i never had a problem with this on my older phone. apple needs to correct this and reimburse me for this cord.

    Charging cords are covered by the iPhone warranty or their own warranty
    if puchased separately. Take your iPhone and the cords to your local
    Apple store for evaluation and possible replacement.

  • A problem with this webpage caused Internet Explorer (IE9) to close and reopen the tab

    I have IE9 (using 32-bit version) installed on a relatively new laptop with Windows 7 64-bit. Up until last weekend IE9 worked fine and Flash Player worked fine too.
    At the weekend a webpage asked for Flash Player to be updated - which I did. Ever since then whenever I go to a webpage needing Flash Player I get the message "A problem with this webpage caused Internet Explorer to close and reopen the tab". This happens twice and then an IE9 error page.
    I have read the discussions in here about the problems with Flash Player 10.3 and have tried the various solutions. I have updated to 10.3.181.16 having tried 15 and 14 previously. Same problem.
    I have reset IE9. Same problem.
    I have disabled all add-ons which stops the problem. If I enable just the Flash Player add-on then the problem recurs. Since there are so many webpages that use Flash I do not want to run my browser without this add-on running.
    If I enable the add-on and run IE9 using software rendering instead of GPU rendering then I don't get the problem. However, this isn't exactly making the best use of the resources on my laptop.
    This may well all be related to the 10.3 problems but no one seems to have mentioned having a problem with tabs closing and reopening so I thought I would post on here to check.
    Any suggestions for how to solve this (other than using software rendering)?

    Thanks again for your reply. I appreciate the time you have taken to respond.
    I think, however, you misunderstand the problem. IE9 does not reopen the tabs on just one website - it is doing this on every website that needs Flash Player. Therefore, running in Compatibility mode is not an option. In fact, because IE9 reopens the tabs so quickly and then ends up with an error page, I cannot even click the Compatibility button anyway.
    I could use ActiveX filtering - true. All that this means is that Flash does not play on any of the websites. When I want to re-enable ActiveX for a particular website where I need to see the Flash Player item, this just triggers the error.
    This problem also happened on .14, .15 and well as the current .16 version. It did not happen with the previous version of Flash Player that I had on the system (version 10.2 I think).
    The fact is that either Flash Player or IE9 or both is/are broken. The two choices I am still left with are:
    1. Use software rendering (which contradicts the latest advertisements for IE9 about unleashing the power of IE)
    2. Use another browser - I have no problems with either Firefox or Chrome

  • I am trying to install iTunes on my PC, but I get this error: "There is a problem with this Windows Installer package. A DLL required for this install to complete could not be run. Contact your support personnel or package vendor." Help!

    I am trying to install iTunes on my PC (using Windows 8.1), but I get this error: "There is a problem with this Windows Installer package. A DLL required for this install to complete could not be run. Contact your support personnel or package vendor." The iTunes file (64-bit) I am trying to install, is named "iTunes64Setup.exe". What seems to be the problem? Help!

    Hey madnest,
    Thanks for the question. After reviewing your post, it sounds like you are having difficulty installing iTunes in Windows. I would recommend that you read this article, it may be able to help you resolve or isolate the issue.
    Issues installing iTunes or QuickTime for Windows
    Thanks for using Apple Support Communities.
    Have a nice day,
    Mario

  • I keep getting the following error message when I try to update my itunes, "There is a problem with this windows installer package. Aprogram run as part of the set up did not finish as expected.  Contact your support personnel or package vendor."

    I keep getting the following error message when I try to update my itunes, "There is a problem with this windows installer package. Aprogram run as part of the set up did not finish as expected.  Contact your support personnel or package vendor."

    Yes, I had found a similar solution also.  I'm running XP Pro, SP3.  I went Control Panels/ Add-Remove programmes/apple software update/ change/ repair.  Then run the 10.5 exe.
    While the programme updated from version 8 of iTunes, my new iTunes is now a mess.  Not all of my music was in the same folder previously but it all showed up on iTunes.  Now many albums have been left out, some have only a few tracks and some have two copies of some tracks as well as having other tracks missing.  I haven't begun to work on that.

  • When attempt to download 10.5, receive message: "...problem with this widows installer package. a program run as part of the set up did not finish as expected. ..." -- what to do?

    I have attempted to upgrade my iPad which is necessar to downloan an app I want (My Radar).  The iTunes on my computer will not process the upgrade of 10.5 without message:  "There is a problem with this Windows Installer Package. A program run as part of the set up did not finish as expected. Contract your support personnel or packae vendor."  ..... Little old lady needs help, my iTunes "appears to be 10.5 on my PC; however, will not upgrade my iPad.  I have BitDefender as the "protector" on my PC if that is the issue.

    Go to support.microsoft.com/fixit
    In section 2 click on: Install or upgrade software or hardware
    Then click on the title in section 3: Fix problems with programs that cannot be installed or uninstall
    This link may get you there:  http://support.microsoft.com/mats/Program_Install_and_Uninstall/
    Let it run and then try to download it again

  • I get the errer message "There is a problem with this windows installer package. A program required for this install to complete could not be run."

    I have Wondows Vista... I tried to upgrade to Itunes 10.5, and received an error orginially stating that I was trying to install a version older than the one I had.  I uninstalled all of itunes, and now I'm getting the error  message "there is a problem with this windows installer package.  Aprogram required for this install to complete could not be run.
    Help!  I have an IPhone, and I would like to get my Itunes upgraded so I can download the new Iphone software...
    Thanks!

    I have been in touch with Apple support in reference to my problem. We went through every solution available, and found no fix. The tech then suggested I contact Microsoft concerning this issue. I thought that suggestion was just to get me pointed somewhere but Apple. Boy was I wrong!! I contacted Microsoft, and was directed to a free download called Microsoft Fix. This program fixed something in the regisitor, and wala everything was fixed!! I now have I-Cloud and I-Tunes loaded and working well. So, if you can't install Apple Software and are running Window 7 you might give Microsoft Fix a try, it fixed my problem.....

  • I am trying to upload itunes 10.5, but get a message "There is a problem with this Window Installer Pkg. A program required for this install to complete could not be run.  Contact your support personnel or package vendor".  What is it I need to do?

    I am trying to install itunes 10.5, but during the download I get the following message, "There is a problem with this Window Installer Package.  A program required for this install to complete could not be run.  Contact your support personanal or package vendor."  If this is my personal computer and was able to upgrade to the previous version (pre 10.5), why not now?  What is my "package vendor"? And what is it I need to do to fix this?  The message is unclear.  Unfortunately, I deleted my itunes program, thinking that in doing so, 10.5 would finally load.  Now I have no itunes on my computer and unable to sync my iphone.  Help!
    Thanks - Rick

    Hi Rick,
    by "repair" I mean I went to the control panel, option - programs and features, and in the list of all my installed programs I selected "Apple Software Update". On top of the screen you find the options Uinstall, Change and Repair. I clicked the repair button and that did the trick. After the repair I could uninstall the program. I also uninstalled iTunes, Apple Application Support, Apple Mobile Device Support en Bonjour, thus all Apple programs. Then I installed iTunes 10.5 again and everything went fine.
    Success,
    Peter

  • I can't move photos from iPhoto to my secondary hard drive or to a burn folder.  I have never had a problem with this before.  This is something new.   They will not drop into either folder.  Nothing happens.

    I can't move photos from iPhoto to my secondary hard drive or to a burn folder.  I have never had a problem with this before.  This is something new.   They will not drop into either folder.  Nothing happens. 
    I checked my secondary harddrive and there is plenty of memory.
    I emptied my burn folder but the photos still will not drop into it.
    I created a new burn folder, no luck with this either.
    230 photos is the maximum size of the events I am trying to move from iPhoto to save elsewhere.
    I have shut down and restarted my computer.   No change. The photos still will not drop out of iPhoto.
    My Mac Computer Storage shows that I have 62.2GB free out of 249.2GB (movies, photos and contacts taking up the most space)
    My Lacie External Harddrive (2TB capacity) shows that I have 1.79TB available.  It shows that 207,729,520,640 bytes (207.73 GB on disk) are used.
    I have never had this problem before.  It is usually very easy to move my photos from iPhoto.
    I am not a computer expert (I work in surgery so don't have a need for lots of computer knowledge) so please explain in simple terms.  
    Thank you so much for any help you can provide.
    I really appreciate it.

    YES Terence!  Thank you. Exporting allowed me to move my photos from iPhoto into the Burn Folder on my desktop.   But that doesn't explain why I'm having to go that route now.   Have I done something (accidentally changed some setting) on my computer that will not allow me to just click and drag anymore?   I really liked the convenience of the click and drag option. 
    I don't have the time tonight to export and burn a lot of CD/DVDs.  I'll try that tomorrow and make sure my photos are moving properly.  I also need to export photos to my external hard drive to make sure that route is working. 
    Wouldn't you know that my Apple Care Plan runs out this Wednesday?!  I need to make sure everything is working properly before that expires. 
    Thank you so much for your help.   I really, really appreciate it.

  • HT1926 when trying to setup itunes on my pc i get the following message: there is a problem with this Windows installer package. A program required for this install to complete could not be run. How could I solve this problem?

    when trying to setup itunes on my pc i get the following message: there is a problem with this Windows installer package. A program required for this install to complete could not be run. How could I solve this problem?

    Repair your Apple software update.
    Go to START/ALL PROGRAMS/Apple Software Update. If it offers you a newer version of Apple Software Update, do it but Deselect any other software offered at the same time. Once done, try another iTunes install
    If you don't find ASU, go to Control Panel:
    START/CONTROL PANEL/Programs n Features/highlight ASU and click REPAIR,

  • ITunes 10.5 Upgrade fails to Install. The Error Message is: "There is a Problem with this Windows Installer Package. A program run as part of the setup did not finish as expected. Contact your support personnel or package vendor."

    When Upgrading on my laptop from iTunes 10.2.11 to 10.5.0 the message I get is: "There is a problem with this Windows Installer Package.  Aprogram run as part of the setup did not finish as expected. Contact your support personnel or pacakge vendor.

    After reading all these posts, one by one did not resolve my problem until I got the very end.  Regardless of what step would resolve your problem, these are the steps I would recomment to everyone for a what seems to be a safe and fool-proof upgrade to iTunes 10.5.
    1. Stand alone upgrade to the latest Quicktime version
    2. Go to control panel and "change" then select repair to the following applications in the order specified by the post on Oct 27. (Notice I skipped Quicktime because it had been upgrade manually,and Bonjour did not have a "repair" option)
    iTunes; Apple Software Update: Mobile Device Support; Apple Applications Support
    Some of these applications may not appear if they do not apply to your configuration (no iPhone, or no iPad, or other apple devices).
    Once all updated, I did not need to restart nor launch any applications, I simply went straight into the 10.5 upgrade, and where it normally got stuck, this time the installation continued for a while longer until it completed successfully.
    Great work everyone who contributed!  Thank you very much!

  • How to re-install iTunes after receiving "There is a problem with this Windows Installer package ..." message?

    Hi,
    This is how it all started. When the new update for iTunes 11 came out, I tried to update it. After I had updated it I found nothing had changed. So i tried rebooting my computer and everything and found that still nothing had changed. So I tried uninstalling it. After that I tried to re-install it, but it came up with the
    "There is a problem with this Windows Installer package ..." message. So I looked around the internet and found a website that told me to uninstall all Apple products. So i did that. When i tried to uninstall Apple Software Update, it came up with the 'problem with windows' message again. So I used Revo to uninstall it. So I rebooted and tried to install it again. It installed Bonjour and all of the other programs but stopped halfway and gave me the 'proplem with windows' message again. I've looked around and most of the solutions have been to try and repair Apple Software Update, but the problem is, I've already deleted it. So can someone PLEASSEEEE help me fix this problem! (Sorry for droning on)

    http://support.microsoft.com/mats/Program_Install_and_Uninstall  try this an see if it fixes it.

  • Hi, I am getting an error message while installing iTunes store app on my windows 7 laptop stating 'There is a problem with this windoes installer package. A program required for this install to complete could not be run. Contact your package  vendor'

    Plz assist

    Let's try the following user tip with that one:
    "There is a problem with this Windows Installer package ..." error messages when installing iTunes for Windows

  • I'm not able to download Itunes.  I keep getting this Apple Software Update message that states "There is a problem with this Windows installer package.  A program required for this install to complete could not be run.  Contact your package vendor"

    Not able to access Itunes store anymore.  Just quit working for no reason.  I've tried deleting Itunes and related components from the Control Panel, but when I try to remove Apple Software Update, I get a message that states "There is a problem with this Windows installer package.  A program required for this install to complete could not be run.  Contact your support personnel or package vendor".  Not sure what this message means.  Am I suppose to contact Apple ?  What is meant by package vendor ?

    Apparently it's an itunes issue. I just tried to update and got the same issue. Called att to activate my iphone 4s and they say they can do the swap but apple is telling them itunes is down atm.  So will have to wait

  • When I try to install iTunes 10.5, it says, "There is a problem with this Windows Installer package.  A program run as part of the setup did not finish as expected.  Contact your support personnel or package vendor."  I have Windows XP and I need help.

    5, it says, "There is a problem with this Windows Installer package.  A program run as part of the setup did not finish as expected.  Contact your support personnel or package vendor."  I have Windows XP and I need help.

    After reading all these posts, one by one did not resolve my problem until I got the very end.  Regardless of what step would resolve your problem, these are the steps I would recomment to everyone for a what seems to be a safe and fool-proof upgrade to iTunes 10.5.
    1. Stand alone upgrade to the latest Quicktime version
    2. Go to control panel and "change" then select repair to the following applications in the order specified by the post on Oct 27. (Notice I skipped Quicktime because it had been upgrade manually,and Bonjour did not have a "repair" option)
    iTunes; Apple Software Update: Mobile Device Support; Apple Applications Support
    Some of these applications may not appear if they do not apply to your configuration (no iPhone, or no iPad, or other apple devices).
    Once all updated, I did not need to restart nor launch any applications, I simply went straight into the 10.5 upgrade, and where it normally got stuck, this time the installation continued for a while longer until it completed successfully.
    Great work everyone who contributed!  Thank you very much!

Maybe you are looking for

  • Embedded application/x-shockwave-flash objects will not display

    4.0b9 on Windows XP I just get a white section where a shockwave flash object should be, and in all the occurences I've found it's when the flash object is embedded. Youtube works just fine, though... In the "white section" I can right-click and get

  • ORA-12154 as oracle user, whit the root account it works fine

    Hello there, I've a problem with a client installation if I try to connect to the database. I've the following configuration: 1. Database: Running on a Ubuntu Jeos VM, Oracle 11g (Release 11.1.0.6.0 64 bit) 2. Client: Running on a CentOS 5.2 VM, Orac

  • Xcelsius on BEx ( Excel ) Report

    Hi All, I have no clue about how Xcelsius works, please give me some feedback on this issue. i am doing some brainstorming on feasibility of doing Xcelsius dashboarding on  BEx Excel report coming out of BW. is it possible can i simply import that Ex

  • FAQ 一些在FI操作中能用到的IDOC知识 (3)

    Sending FI documents in New G/L 1. Sending the entry view (BKPF/BSEG)     - Entries in BKPF and BSEG/BSEG_ADD are required in the target system.     - With IDoc type FIDCCP01/02. Corresponds to the document structure, additional fields were included

  • How to add TransformGroup to a live TransformGroup?

    I do like this: // scene---- BranchGroup , is live // objScale--- TransformGroup, is live u.getLocale().removeBranchGraph(scene); objScale.removeChild(objScale.numChildren()-1); objScale.addChild(g); u.getLocale().addBranchGraph(scene); I call this c