Sorry, if there was a newbie forum I would have used it

I am only starting out on JSF and I unfortunately need a lot of help getting simple things to work. Here is something which is boggling me:
I have a Login form which accepts Username + Password and validates it using LDAP. My problem is that the value returned from the inputText control which I pass to LDAP never seems to be null or spaces!
In my backing bean i have something like this:
protected String userId;
public String authUser(){
try {
     System.out.println("userid =" + userId + "=");
     if(userId==null){
          System.out.println("userid not entered");
          msgLogin = "Please enter a username";
          return "fail";
     if(userId==""){
          System.out.println("userid not entered");
          msgLogin = "Please enter a username";
          return "fail";
public String getUserId() {
     return userId;
public void setUserId(String userId) {
     this.userId = userId;
And in my JSP I have:
<tr>
<td class="label">Username : </td>
<td><h:inputText id="username" value="#{pc_Login.userId}" size="15">
<f:validateLength maximum="8"></f:validateLength>
</h:inputText
</td>
</tr>
So even if I leave this userId field blank it still doesn't reach inside any of the 'if' statements in my bean. What am I doing wrong?
I know I can just add required=true to my jsp statement to force an entry but I need to know why this happens for future reference.
Please also excuse my code as I have tried many things to try and fix this problem. But if you do have some suggestions on best practices that would also be very much appreciated.
Thanks alot

Well I actually bind the inputText value to my backing bean property by the value="#{pc_Login.userId}" statement. I don't use id=username except in the jsp to assign a message, javascript etc.
What I need to check is whether any value was entered on the jsp page. If there was no entry I want to display an error message. I thought those if statements would do it but the application slips right by them.
Is userID thus an object and not simply the variable containing the value entered by the user? If so do I need to do some getValue operation to be able to check the string value?

Similar Messages

  • My iphone 4 with 4.3.3 upgrade to 5.1.1,it said to me I should active it,I buy a active-card but it say 'Your request couldn't be processed.We're sorry, but there was an error processing your request. Please try again later.'  What's wrong with my iphone

    my iphone 4 with 4.3.3 upgrade to 5.1.1,it said to me I should active it,I buy a active-card but it say 'Your request couldn’t be processed.We’re sorry, but there was an error processing your request. Please try again later.'  What's wrong with my iphone

    It sounds a lot like your phone was jailbroken or hacked to unlock it before you updated.
    Was it?

  • My iphone 4s cant activate after i update the ios to 6.0.1, always shows this message " Your request couldn't be processed" we are sorry but there was an error processing your request, Please try again later........please someone help me...

    My iphone 4s cant activate after i update the ios to 6.0.1, always shows this message " Your request couldn't be processed" we are sorry but there was an error processing your request, Please try again later........please someone help me???

    It sounds a lot like your phone was jailbroken or hacked to unlock it before you updated.
    Was it?

  • Hello! I want to set up an appointement with Genius Bar but when i choose the available date and try to confirm there is this message appears : We're sorry. There was an error processing your request. Click OK to try again. HELP ME PLEASE

    Hello! I want to set up an appointement with Genius Bar but when i choose the available date and try to confirm there is this message appears : We're sorry. There was an error processing your request. Click OK to try again. HELP ME PLEASE

    I have called the store with the same problem but the answer is this must be done on line. I was told to use a different browser but it has made no difference - I am still having the same problem

  • Your request couldn't be processed.  We're sorry, but there was an error processing your request. Please try again later.

    Hi I am getting this message at apple.com store when checking my ATT upgrade availablity.
    I for sure have an upgrade on the line i am checking in fact it is out of contract.
    All my other lines cheking are fine even at best buy .com upgrade is OK.
    But for many days at apple all I get is this message Your request couldn’t be processed.  We’re sorry, but there was an error processing your request. Please try again later
    again all my other lines are fine i tried checling with apple app sticll same error mesage
    ATT is no help the person at APPLE so far no help
    Running out of time want to order iphone 6 at 2 am central friday.
    Has any doing a att upgrade check received this message ???
    thanks for any help
    Trido

    Hi I am getting this message at apple.com store when checking my ATT upgrade availablity.
    I for sure have an upgrade on the line i am checking in fact it is out of contract.
    All my other lines cheking are fine even at best buy .com upgrade is OK.
    But for many days at apple all I get is this message Your request couldn’t be processed.  We’re sorry, but there was an error processing your request. Please try again later
    again all my other lines are fine i tried checling with apple app sticll same error mesage
    ATT is no help the person at APPLE so far no help
    Running out of time want to order iphone 6 at 2 am central friday.
    Has any doing a att upgrade check received this message ???
    thanks for any help
    Trido

  • HT201365 Hi all, im from dubai. someone stolen my iphone5. i was trying to erase my data via find my iphone. in the end there was a notification that remove. i have click remove. then it never shows my device in find my iphone. how can i see my device in

    Hi all, im from dubai. someone stolen my iphone5. i was trying to erase my data via find my iphone. in the end there was a notification that remove. i have click remove. then it never shows my device in find my iphone. how can i see my device in my pc...?

    Here's an interesting bit: iTunes will let me restore my iPod touch from backup: it's still running iOS 4.3.3. I figured as much... there's backups showing in the Preferences -> Devices list for both devices (and even my old, long gone iPod touch 2G), but my iPhone (on iOS5) isn't giving me any such option. I remember I had to downgrade before to get the backup restored (something went haywire in the setup assistant, and I couldn't restore a backup from iTunes there)... If it was possible to go to iOS 5.0 rather than 5.0.1 I would just do the same thing again, but iOS 5.0.1 isn't an option. I attached a screenshot. Hopefully Apple can get this nonsense sorted out; I think iOS 5 might be the root of this, somehow.

  • HT204053 I created Apple ID with my email add. There was a typo. Apple would not let me correct. I was told to use diff email add,  Now I cannot access my Itunes or icloud account on my mobile device.  How do I fix this?

    I created Apple ID with my email add.   There was a typo.  Apple would not let me correct.  I was told to use a diff email add.  I did. Now I cannot access my itunes or icloud account on my mobile device.  How do I fix this?

    Are you trying to change the iCloud ID on your phone?
    Also, you can change your iTunes ID by going to Settings>iTunes & App Store, tap the ID, sign out, then sign back in with the ID you want to use.

  • HT4009 My 6 year old was playing on a app we have used for ages, then i received numerous emails sating about $600 of in app purchases had been made. i don't understand how this happened as my child does not know my apple i.d password.

    My 6 year old was playing on an app we have used for ages then last night i recieved numerous emails stating about $600 of in app purchases had been made! i dont know how this happened as my child does not know my apple i.d. password!

    You can try contacting iTunes support and see if they give you a refund or credit for some/all of it : http://www.apple.com/support/itunes/contact/ - click on Contact iTunes Store Support on the right-hand side of the page, then Purchaes, Billing & Redemption.
    To stop it happening again you can turn off in-app purchases on your iPad via Settings > General > Restrictions > In-App Purchases, and also in Restrictions change Require Password to 'Immediately' - the default is 15 minutes during which it doesn't need to be re-entered.

  • My iPad 2 screen has gone blank. I don't know whether the iPad is on however when the screen went blank there was 97% battery. Does anyone have any ideas as to what the problem maybe. ?

    The screen on my iPad 2 has gone blank.i can't tell whether my iPad is on or not. When the screen went blank there was 97% battery. Could anyone possible give me an idea as to what May have happened and if it can be fixed.
    Thank you, Nicky .

    Frozen or unresponsive iPad
    Resolve these most common issues:
        •    Display remains black or blank
        •    Touch screen not responding
        •    Application unexpectedly closes or freezes
    http://www.apple.com/support/ipad/assistant/ipad/
    iPad Frozen, not responding, how to fix
    http://appletoolbox.com/2012/07/ipad-frozen-not-responding-how-to-fix/
    iPad Frozen? How to Force Quit an App, Reset or Restart Your iPad
    http://ipadacademy.com/2010/11/ipad-frozen-how-to-force-quit-an-app-reset-or-res tart-your-ipad
    Black or Blank Screen on iPad or iPhone
    http://appletoolbox.com/2012/10/black-or-blank-screen-on-ipad-or-iphone/
    What to Do When Your iPad Won't Turn On
    http://ipad.about.com/od/iPad_Troubleshooting/ss/What-To-Do-When-Your-Ipad-Wo-No t-Turn-On.htm
    iOS: Not responding or does not turn on
    http://support.apple.com/kb/TS3281
    iPad: Basic troubleshooting
    http://support.apple.com/kb/TS3274
     Cheers, Tom

  • I Have this error when i try to access Resource central in Encore CS4:We're sorry, but there was an error communicating with the server.  Please try again and if the problem persists, contact Adobe Technical Support. (200) INVALID_QUERY : [object XMLList]

    Please anyone whit same problem tell me something i need a solution...
    Best regards,
    Luís Vaz de Miranda.

    I do not believe the Resource Central exists anymore. You can download the CS6 full library.
    http://helpx.adobe.com/encore/using/download-library-content.html

  • During Update there was an "error 45" and i have lost all my data??

    I was having difficulties in updating my iphone to 4.3.3. I have switched the antivirus and firewall off and it worked with 1st iphone but the second one it started the update process but then when iPhone was in secure mode or whatever it's (when all your data is wiped up and the itune software syncing all data back in to iphone). The little window appeared saying " the iphone could not be updated the eror 45 has occured". I have restored it but i didnt have all my data?? although before update i did take a back up? i dont know whats going on? please help....

    I am only asking cause I had the same issue, I was updating my iTunes and then it suggested that i do a back up, while I was doing the back up it just hung there and my phone got shut, i tried to open my phone it starts clean and takes me back to the start up screens i saw when i first used my iPhone

  • There was a reason why I don't use IE and you just copied it??????

    I have always liked FIREFOX for it's speed and it simply was always the best browser. Not too long ago I tried IE 9 beta and I hated it as it was confusing. My nine year old also hated it. So I emailed Microsoft and got a response that it was to maximise screen size. I simly uninstalled it. Today I got Firefox 4 beta 8. After trying it I also uninstalled it. Looks like a IE clone and like IE I found it hard to find anything. My only real question is WHY????????????????

    What don't you like about the Firefox 4 beta?
    You can remove the orange Firefox button and enable the menu bar if you press the F10 key and place a checkmark on View > Toolbars > Menu Bar if that is what you mean.
    You can remove the checkmark on "Tabs on Top" to place the Tab bar at its old position.

  • I had an iPhone and iPad but my phone quit receiving calls so I got a Samsung Galaxie and now part of my messages go to my iPad instead of phone. How do I correct this problem? If I would have known this was going to happen I would have stayed with iPhone

    Can you help me get my part of my messages from my iPad to my new Samsung phone?

    iMessage on the iPad only sends messages to other Apple iOS devices. You need to send SMS messages to non-Apple devices. See below.
    Unable to make or receive FaceTime calls after April 16, 2014
    http://support.apple.com/kb/TS5419
    Using FaceTime http://support.apple.com/kb/ht4319
    Troubleshooting FaceTime http://support.apple.com/kb/TS3367
    The Complete Guide to FaceTime + iMessage: Setup, Use, and Troubleshooting
    http://tinyurl.com/a7odey8
    Troubleshooting FaceTime and iMessage activation
    http://support.apple.com/kb/TS4268
    iOS: FaceTime is 'Unable to verify email because it is in use'
    http://support.apple.com/kb/TS3510
    Using FaceTime and iMessage behind a firewall
    http://support.apple.com/kb/HT4245
    iOS: About Messages
    http://support.apple.com/kb/HT3529
    Set up iMessage
    http://www.apple.com/ca/ios/messages/
    iOS and OS X: Link your phone number and Apple ID for use with FaceTime and iMessage
    http://support.apple.com/kb/HT5538
    How to Set Up & Use iMessage on iPhone, iPad, & iPod touch with iOS
    http://osxdaily.com/2011/10/18/set-up-imessage-on-iphone-ipad-ipod-touch-with-io s-5/
    Set Up Alert Sounds
    http://www.quepublishing.com/articles/article.aspx?p=1873027&seqNum=3
    Extra FaceTime IDs
    http://tinyurl.com/k683gr4
    Troubleshooting Messages
    http://support.apple.com/kb/TS2755
    Troubleshooting iMessage Issues: Some Useful Tips You Should Try
    http://www.igeeksblog.com/troubleshooting-imessage-issues/
    Setting Up Multiple iOS Devices for iMessage and Facetime
    http://macmost.com/setting-up-multiple-ios-devices-for-messages-and-facetime.htm l
    FaceTime and iMessage not accepting Apple ID password
    http://www.ilounge.com/index.php/articles/comments/facetime-and-imessage-not-acc epting-apple-id-password/
    Fix Can’t Sign Into FaceTime or iMessage iOS 7
    http://ipadtutr.com/fix-login-facetime-imessage-ios-7/
    FaceTime, Game Center, Messages: Troubleshooting sign in issues
    http://support.apple.com/kb/TS3970
    Unable to use FaceTime and iMessage with my apple ID
    https://discussions.apple.com/thread/4649373?tstart=90
    iOS 7 allows you to block phone numbers or e-mail addresses from contacting you via the Phone, FaceTime, or Messages
    http://howto.cnet.com/8301-11310_39-57602643-285/you-can-block-people-from-conta cting-you-on-ios-7/
    How to Block Someone on FaceTime
    http://www.ehow.com/how_10033185_block-someone-facetime.html
    My Facetime Doesn't Ring
    https://discussions.apple.com/message/19087457#19087457
    How to watch FaceTime calls on the big screen with Apple TV
    http://www.imore.com/daily-tip-ios-5-airplay-mirroring-facetime
    Send an iMessage as a Text Message Instead with a Quick Tap & Hold
    http://osxdaily.com/2012/11/18/send-imessage-as-text-message/
    To send messages to non-Apple devices, check out the TextFree app https://itunes.apple.com/us/app/text-free-textfree-sms-real/id399355755?mt=8
    How to Send SMS from iPad
    http://www.iskysoft.com/apple-ipad/send-sms-from-ipad.html
    How to Receive SMS Messages on an iPad
    http://yourbusiness.azcentral.com/receive-sms-messages-ipad-16776.html
    Apps for Texting http://appadvice.com/appguides/show/apps-for-texting
    You can check the status of the FaceTime/iMessage servers at this link.
    http://www.apple.com/support/systemstatus/
     Cheers, Tom

  • Would be useful if there was a monitor option for posts

    When you post a message to a forum it would be useful if there was an option for it to email you when your post has been replied to.
    Also when performing a search it would be useful to display the number of replies to the messages - ie there is no point looking at a message if it has had no reply.

    Hi Todd,
    thanks for the feedback. I will share this with the technical team.
    Thanks and kind regards,
    Claire

  • I have too much music on my computer so i was wondering if there was an app that would randomize the music that goes on to my ipod everytime i used it

    I have too much music on my computer so i was wondering if there was a an app that would randomize the music that goes on to my ipod everytime i used it

    iOS: Importing personal photos and videos from iOS devices to your computer
    iOS: Unable to import photos or device not recognized as a camera

Maybe you are looking for