Having problems with a boolean expression

i have the following:
the problem is no matter if i try "equal" or "==" the return string it always returns false!! just to make a little more obvious:
if (1>1 == false)
is true therefore retrieveData should return NOT_LOGGED_IN and i have confirmed this and it does yet if (servletString.equals("NOT_LOGGED_IN"))
does not agree with me.
Any ideas?!
     private void doAuthenticate(HttpServletRequest request, HttpServletResponse response) {
          username = request.getParameter("username");
          password = request.getParameter("password");
        try {     
     Customer customer = new Customer();
          System.out.println(1>1);
               if (1>1 == false)
               processResponse(response, "NOT_LOGGED_IN");
          } else {
               System.out.println("You're logged in.");
               response.setContentType("text/html");
        } catch (Exception e) {
          e.printStackTrace();
  public void doValidateUser()
          System.out.println(userNameTextField.getString());
          try {
               HttpConnection hc = getConnection("?blah");
             hc.setRequestMethod( HttpConnection.GET );
             hc.setRequestProperty("User-Agent","Profile/MIDP-1.0 Configuration/CLDC-1.0" );
             hc.setRequestProperty("Content-Language", "en-US" );
             hc.setRequestProperty("Accept", "text/plain" );
             sendData(hc);
             String servletString = receiveData(hc);
             System.out.println("servletString="+ servletString);
             System.out.println("servletString.size="+ servletString.length());
             if (servletString.equals("NOT_LOGGED_IN"))
                    //                  something..
             else {
                 //something else
          catch (Exception e)
               System.out.println(e);
    }and this:
  private String receiveData(HttpConnection connection) throws IOException {
         int rc = connection.getResponseCode();
         StringBuffer sb = new StringBuffer();
         DataInputStream is = connection.openDataInputStream();
         String dataIn = null;
         try {
              if (rc == HttpConnection.HTTP_OK) {
                   int c;
                   while (( c = is.read()) != -1)
                        sb.append((char)c);
                   dataIn = sb.toString();
                   System.out.println(String.valueOf(rc));
                   System.out.println(dataIn);
                   is.close();
              } else if (rc == HttpConnection.HTTP_UNAUTHORIZED) {
                   int contentLength = (int)connection.getLength();
                   byte[] raw = new byte[contentLength];
                   int length = is.read(raw);
                   String s = new String(raw, 0, length);
                   stringItem.setText(s);
         } catch (IOException ioe) {
              stringItem.setText(ioe.toString());
         return dataIn;
    }

I still couldn't figure it out guys.
processResponse:
     private void processResponse(HttpServletResponse response, String output)
     throws IOException, ServletException {
               response.setContentType("text/html; charset=UTF-8");
               PrintWriter out = response.getWriter();
               out.println(output);
     }simply prints out whatever i pass it.
in the recieveData code i placed:
System.out.println("dataIn.equals" + dataIn); just before the return dataIn line and it prints
dataIn.equalsNOT_LOGGED_IN
and here is where i use it:
String servletString = receiveData(hc);if (servletString.equals("NOT_LOGGED_IN"))
     tryAgain();
it never equals NOT_LOGGED_IN for some reason!!
i even printed what servletString equals:
servletString.equalsNOT_LOGGED_IN
before the if statement
  System.out.println("servletString.equals" + servletString);
             if (servletString.equals("NOT_LOGGED_IN"))
                  System.out.println("Blah!");
             }blah is never printed!! :\

Similar Messages

  • Having problems using ion tape express with itunes cannot find the song on hard drive

    Having problems using ION tape express with itunes.  The song is on hard drive as temp1 not the name of the song.  And I have problems playing it in itunes
    because it says it cannot locate the song'

    Then correct the name of the song or point iTunes to the new file.
    Issues with restoring should be directed to the manufacturer of the backup software/device... this is not an Apple or iTunes issue.

  • Having problem with change of name in the datagrid Coding

    I am having problem with changing the name of the datagrid header text name for one of the data either in the flash file or the php file.
    The thing is i want to change the Course_Name to Course Name that has no underscore so that it will look nicer in the datagrid but if I change it in the php file like SELECT Course_Name as 'Course Name' ....., it will not turn out in the datagrid when I CTRL ENTER the flash file but the others like Price,description and display is shown.
    There is no problem with my php code but I do not know how to change the Course_Name into Course Name so please help me resolve this error that I am having.
    This is my flash code
      function goCourse(e : MouseEvent):void
      gotoAndStop(5);
      refreshResponder = new Responder (refreshSuccess, onFault);
      connection = new NetConnection ();
      connection.connect (gateway);
      dataDG.addEventListener (Event.CHANGE, gridItemSelected);
      refreshData (true);
      function gridItemSelected (e: Event): void {
      ID = e.target.selectedItem.ID;
      courseTxt.text = e.target.selectedItem.Course_Name;
      priceTxt.text = e.target.selectedItem.Price;
      descTxt.text = e.target.selectedItem.Description;
      private function getParams () {
      var param: Object = new Object ();
      param.ID = ID;
      param.Course_Name = courseTxt.text;
      param.Price = priceTxt.text;
      param.Description = descTxt.text;
      return param;
      private function refreshData (refresh: Boolean): void {
      if (refresh)
      connection.call ("Course.viewCourse", refreshResponder);
      private function refreshSuccess (result: Object): void {
      dataDG.dataProvider = RecordSetDP.toDataProvider (result);
         dataDG.columns = ["Course_Name","Price","Description","Display"];
      private function onFault (fault: Object): void {
      trace (String (fault.description));
    This is my php file code.
      function viewCourse()
      $this->connect();
      $sql = "SELECT Course_Name,Price,Description,Display
      FROM coursetb";
      return mysql_query($sql,$this->_connection);

    i don't see where you're calling your php file in your code, but change 'Course Name' to 'Course_Name' (or vice-versa) there.

  • Has anyone experienced problems with their airport express since yosemite?

    Since updating to Yosemite, I am constantly having issues with my Airport Express.  It flashes yellow, indicating no connection.  I have attempted to:
    Soft Reset:  Unplug it (Airport Express) and plug in again
    Factory Reset:  Unplug it, push & hold the reset button with a paper clip while pulling it back in.
    A Tip From Another Site:  Unplug our Time Capsule we use as a router & the Airport Express, wait 3 minutes - then plug in the Time Capsule, wait another minute - then plug in Airport Express.  This worked for a very short amount of time, then the light started flashing yellow again.
    Again, I had no problems before updating to Yosemite.
    I look forward to & appreciate any help resolving this issue.

    Hi I have the same problem after upgrading to Yosemite
    I don't know why some times ping request to airport extreme is so long:
    64 bytes from 10.0.0.254: icmp_seq=3529 ttl=255 time=0.892 ms
    64 bytes from 10.0.0.254: icmp_seq=3530 ttl=255 time=0.875 ms
    64 bytes from 10.0.0.254: icmp_seq=3531 ttl=255 time=0.831 ms
    64 bytes from 10.0.0.254: icmp_seq=3532 ttl=255 time=0.802 ms
    64 bytes from 10.0.0.254: icmp_seq=3533 ttl=255 time=1.172 ms
    64 bytes from 10.0.0.254: icmp_seq=3534 ttl=255 time=0.951 ms
    64 bytes from 10.0.0.254: icmp_seq=3535 ttl=255 time=6.246 ms
    64 bytes from 10.0.0.254: icmp_seq=3536 ttl=255 time=26.014 ms
    64 bytes from 10.0.0.254: icmp_seq=3537 ttl=255 time=71.004 ms
    64 bytes from 10.0.0.254: icmp_seq=3538 ttl=255 time=117.939 ms
    64 bytes from 10.0.0.254: icmp_seq=3539 ttl=255 time=171.653 ms
    64 bytes from 10.0.0.254: icmp_seq=3540 ttl=255 time=207.489 ms
    64 bytes from 10.0.0.254: icmp_seq=3541 ttl=255 time=0.812 ms
    64 bytes from 10.0.0.254: icmp_seq=3542 ttl=255 time=0.670 ms
    64 bytes from 10.0.0.254: icmp_seq=3543 ttl=255 time=8.185 ms
    64 bytes from 10.0.0.254: icmp_seq=3544 ttl=255 time=0.935 ms
    64 bytes from 10.0.0.254: icmp_seq=3545 ttl=255 time=0.693 ms
    64 bytes from 10.0.0.254: icmp_seq=3546 ttl=255 time=0.793 ms
    64 bytes from 10.0.0.254: icmp_seq=3547 ttl=255 time=16.345 ms
    64 bytes from 10.0.0.254: icmp_seq=3548 ttl=255 time=62.348 ms
    64 bytes from 10.0.0.254: icmp_seq=3549 ttl=255 time=106.804 ms
    64 bytes from 10.0.0.254: icmp_seq=3550 ttl=255 time=152.399 ms
    64 bytes from 10.0.0.254: icmp_seq=3551 ttl=255 time=200.171 ms
    64 bytes from 10.0.0.254: icmp_seq=3552 ttl=255 time=1.027 ms
    64 bytes from 10.0.0.254: icmp_seq=3553 ttl=255 time=0.736 ms
    64 bytes from 10.0.0.254: icmp_seq=3554 ttl=255 time=1.033 ms
    64 bytes from 10.0.0.254: icmp_seq=3555 ttl=255 time=1.020 ms
    64 bytes from 10.0.0.254: icmp_seq=3556 ttl=255 time=0.981 ms
    64 bytes from 10.0.0.254: icmp_seq=3557 ttl=255 time=0.967 ms
    64 bytes from 10.0.0.254: icmp_seq=3558 ttl=255 time=0.866 ms
    64 bytes from 10.0.0.254: icmp_seq=3559 ttl=255 time=41.596 ms
    64 bytes from 10.0.0.254: icmp_seq=3560 ttl=255 time=86.209 ms
    64 bytes from 10.0.0.254: icmp_seq=3561 ttl=255 time=133.951 ms
    64 bytes from 10.0.0.254: icmp_seq=3562 ttl=255 time=180.552 ms
    64 bytes from 10.0.0.254: icmp_seq=3563 ttl=255 time=1.063 ms
    64 bytes from 10.0.0.254: icmp_seq=3564 ttl=255 time=1.345 ms
    64 bytes from 10.0.0.254: icmp_seq=3565 ttl=255 time=1.078 ms
    64 bytes from 10.0.0.254: icmp_seq=3566 ttl=255 time=0.945 ms
    64 bytes from 10.0.0.254: icmp_seq=3567 ttl=255 time=1.168 ms

  • Having problems with Bridge shutting down after saving photo in PS Cs5,,,,,,,,,  Also when i attempt to update either PS or bridge get an error message in Adobe application manger "Error loading updater workflow"

    Having problems with Bridge shutting down after saving photo in PS Cs5,,,,,,,,,  Also when i attempt to update either PS or bridge get an error message in Adobe application manger "Error loading updater workflow"

    Sorry for the late reply. My email firewall has become a little over zealous & sent a lot of my emails straight to my junk email folder, so I have only just now discovered your reply in my junk mail folder.
    The only "don't open files exceeding xxx megabytes" instruction I can find in my Prefs, is in the Bridge Prefs for Thumbnails, & mine is set at 1000mb. The biggest files I handle are bigger than 200mb so I should be able to open a few, not just one.
    However, this doesn't explain why I can open a psd format file of 180mb, close it, but then can't open a RAW format file of only 26mb immediately after.
    I can open the RAW file only if I restart my computer - very annoying!
    However, thanks for the advice about the video card & memory.
    So, I'm still stuck as to what the issue is.

  • Is anyone having problems with the battery heating up and draining the power?  Mine has been doing this for about 2 months now.

    Is anyone having problems with the battery heating up and draining the power?  Mine has been doing this for about 2 months now.

    This is a major problem with Lollipop, but yo said it started 2 months ago.   Several people have fixed problem by removing FaceBook And Face book messenger and then re loading the apps again.   You might want to clear your cache before reloading.  Not sure this is your problem, but worth a try.  Good Luck

  • I am having problems with creating my apple id. On the phone it is advising me that the ID is not created and then when i do it online it says that it has been created. Can you advise me on what to do please?

    I am having problems with creating my apple id. On the phone it is advising me that the ID is not created and then when i do it online it says that it has been created. Can you advise me on what to do please?

    Apple ID FAQ   http://support.apple.com/kb/HE37

  • HT1657 I am having problems with sound in my rental movies

    We rent movies all the time but lately we are having problems with sound for our movie rentals.  We watch the first half hour without a problem than the voice is choppy all the time.  Sometimes it is good for five minutes than noting for a while.  We  have tried everything we could think of with no avail.  I could see one movie but the last 5 or so have been the same.  Done trying we need to fix this!  Help!  Any ideas?

    First try resetting your iPad by simultaneously pressing and holding the Home and Sleep/Wake buttons until you see the Apple Logo. This can take up to 15 seconds so be patient and don't release the buttons until the logo appears. Try again to see if the problem persists.
    If you still have the same issue, it's possible that something is lodged in the earphone jack. This can cause the iPad to think earphones are plugged in when they are not. Use a vacuum to try to suck any dust, lint or other foreign matter from the jack. If that still doesn't work, try CAREULLY using a toothpick.

  • Hi Can anyone help. I'm having problem with FaceTime on my IPAD .It connects but cuts out Simolarly when someone calls me it connects , then cuts out ThanksBrian

    Hi Having problem with FACETIME on my IPAD Connects to call but then cuts out , similarly calls in connect & cut out Can someone help. Brian

    My ipad is doing the same thing to it won't let me except a incoming call on Facebook and I don't know what to do

  • I am using my Ipad on a remote craftshow site and am having problems with battery lasting 8 hrs. Can I use a 12v rv battery to recharge it or atleast maintain the charg over longer periods of time? I have a dc adapter. thanks

    I am using my Ipad on a remote craftshow site and am having problems with battery lasting 8 hrs. Can I use a 12v rv battery to recharge it or at least maintain the charge over longer periods of time? I have a dc adapter. thanks

    You should be able to use the battery if you get a car type charger which recharges mobile devices.
    The full size iPads use a 10-12W charger, whereas the mini uses a 5W charger. Many car chargers only supply 5W. But at 5W, the car charger should give you some extra time on your iPad. It would be best to use a 10-12W car charger.
     Cheers, Tom

  • I am having problems with my music collection, after burning all of my music to the computer I organized it into folders and placed it in the iTunes Folder. Starting on a new computer now. I can get my music from old computer?

    I am having problems with my music collection, after burning all of my music to the computer I organized it into folders and placed it in the iTunes Folder. As of now i realize this was a mistake. Starting on a new computer now. I cant get my music to transfer from the itunes folder on the old computer? I keep getting error "Can't Read from the source file or disk." Whenever I got to folder properties its always checked read only. But when i play the song it works just fine. Im sure this is just because I added music into itunes folder but is there anyway to fix it?

    WMA files are 'window media audio' files, which is a Microsoft format. If you want to add them to your iTunes library on your Mac then you will need to convert them into a compatible format first. If you still have your windows machine then iTunes for Windows can convert them from WMA to MP3 format : https://discussions.apple.com/message/24158701#24158701
    Or try a search for, for example, 'convert wma to mp3' to find programs to convert them.

  • I am having problem with MDV Studio.

    Hello happy guys, whatzup? Guess all ya 'r doing fine? Right!
    I am using Dreamweaver from Macromedia Studio 2004. I am having problem with Inserting Record into Access database using the forms I create on my .asp document. I am using IIS and Javascript as my Document Technology. The error I usually have is:
    "Technical Information (for support personnel)
    Error Type:
    Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
    [Microsoft][ODBC Microsoft Access Driver] Operation must use an updateable query.
    /site_files/user_regform.asp, line 78
    Browser Type:
    Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/530.5 (KHTML, like Gecko) Chrome/2.0.172.28 Safari/530.5
    Page:
    POST 41 bytes to /site_files/user_regform.asp
    POST Data:
    uname=Honesty&pword=admin&MM_insert=form1
    Time:
    Tuesday, June 02, 2009, 1:49:39 PM"
    Please I need assistance on how to solve this problem. Thank you.
    Similarly, I don't really know how to write sql strings - I just give commands and Dreamweaver will generate the sql strings. Yet, I still observe errors. But I think, for the sql aspect, I'm undergoing a tutorial note that I downloaded on the internet.
    Please help me to solve this error problem at the moment. The sql knowledge is not the problem. I can get that at my leisure.
    Thank you.
    Eyo Eyo (Nigeria).

    It sounds like you do not have an internet connection (wifi arcs in the upper left does not mean you have a connection) since Safari does not work also.. Try the following:
    - Reset the iPod. Nothing will be lost.
    Reset iPod touch:  Hold down the On/Off button and the Home button at the same time for at
    least ten seconds, until the Apple logo appears.
    - Power off and then back on the router
    - Reset networks settings: Settings>General>Reset>Reset Network Settings
    - iPhone and iPod touch: Troubleshooting Wi-Fi networks and connections

  • I am having problems with my itunes, when plugging my iphone or ipod to the laptop - i can see iphone/ipod in the top right corner of itunes but when i click this to the see what is on theis iphone/ipod the option is no longer there, this was working

    I am having problems with the new itunes set up ........
    when i plug in my iphone or ipod touch it shows in the top right hand corner of itunes
    BUT when i click on the shown iphone/ipod the icon its no longer there, i was useing this fine yesterday and it was showing yesterday what is on this ipod and would allow me to add/remove music, but now this option is no longer availlable - i have added a couple of albums to my itunes i can listen to the music from the laptop but cannot sync the ipods to trancefer these albums to the handheld devices -
    i have been trying to sort this all day with no luck not sure if there is a problems with itunes or is it something i am doing ????
    HELP !!!!!!!!!!!!

    BOB we need you urgently
    Perhaps Bob will see this thread, he is the professor in these cases.
    You do not use a WEP password but wpa/wpa2 on router and equipment.
    All equipment connects to WiFi, but for your iPad.
    Even with all other equipment WiFi off, you cannot connect your iPad.
    Your iPad connects to other WiFi nets correctly.
    All resets etc done on iPad and Router.
    Still I am not sure it is your router for sure, frustrating...
    I want to test 2 other things:
    1. in your iPad, set everything OFF in Settings/Cellular, turn off/then/on your WiFi, and see whether it will still not connect...
    2. If that does not do it: disconnect the router as well as the modem from the power, for 15 seconds, then reconnect the modem, let it fully start, then reconnect the routet let it fully start, turn of your WiFi in iPad, then on, and see whether it will connect.

  • I am having problem with me Iphone4, looks like the mic of my phone is not working. no one can hear me if I make a call to them

    Can any one please help me I am having problem with me Iphone4, looks like the mic of my phone is not working. no one can hear me if I make a call to them. I have tried all restoring options but no use. please help me

    The mic on my iPhone4 has just quit also. Similar symptoms to yours in that people I'm talking to hear only static or my voice very faintly. The voice/memo recorder also only really records static.
    It happened suddenly and seemed to get better after a day or two but then went completely after another day.
    I'm returning it to Vodafone New Zealand shortly but will have to wait 5-10 days for a replacement. There are NO Apple accredited means to speed this procedure up in NZ.
    We don't even have a single physical Apple Store where you could walk in and talk to a Genius.

  • I am having problems with the Preview application.  When I try to use it to open a pdf document it gets hung-up and I have to select force quit to close it.   Any ideas on how to resolve this problem?  Thanks for any help

    I am having problems with the Preview application.  When I try to use it to open a pdf document it gets hung-up and I have to select force quit to close it.   Any ideas on how to resolve this problem?  Thanks for any help

    Can you open the Preview program without loading a file, like by itself?
    If it doesn't load then I suspect a corrupt Preview preference file.
    Deleting the System Preference or other .plist file
    Can you open other files with Preview, like jpg's and images?
    How about other PDFs? or is it just that one you have downloaded?
    Run through this list of fixes
    Step by Step to fix your Mac

Maybe you are looking for

  • Hi there some of my apps open and then close imedietly

    My safari and mail apps open and close not even a split second after I opens them please help

  • How can i merge different apple id?

    DEAR:      I am a fresh man to apple's product. Now, i got ipad air & ipad mini & mbp. but each of the three devices has different apple id...      at the beginning, I didn't realize it is a problem until i use icloud and app purchase.      i tried n

  • Seeburger AS2 Adapter with HTTPS transport

    The AS2 adapter is generating the following error. Message processing failed. Cause: javax.resource.ResourceException: Fatal exception: javax.resource.ResourceException: SEEBURGER AS2: HTTP-Client component init failed # java.security.PrivilegedActio

  • Problems with planning function in sneak preview J2EE

    Hi all, I have a 2 systems environment with sneak preview J2EE and ABAP on my notebook. I configured SLD, JCo and in the 2004s with ta SPRO the planning function. I can connect with ta RSPLAN to the J2EE server, but I get the error message: com.sap.t

  • Urgent :::::.i WISH TO DO THIS WITH JDOM and JAVA .

    file A.XML <XML> <TP> <FF> </FF> </TP> </XML> file B.XML <XML> <TP> <GG> </GG> </TP> </XML> I WANT TO PASTE node GG in b.xml to a.xml like this <XML> <TP> <FF> <GG> </GG> </FF> </TP> </XML> i WISH TO DO THIS WITH JDOM and JAVA . Please let me know ho