×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Aug 2010
    Posts
    23

    Question While + response.getWriter()

    Hi

    I have a servlet that is connected to a midlet.
    the midlet has its information from the database using the servlet by the response.getWriter().

    this is a part of my code here:

    PrintWriter out = response.getWriter();
    while (!Types[i].equals(""))
    {
    out.println(Types[i]);
    i++;
    }

    where Types is a String [ ] that contains the data from the database.
    but an error is always showing, i guess it is because of the while loop.
    can anyone tell me why is it showing?

    Regards

  2. #2
    Registered User
    Join Date
    Oct 2009
    Location
    Noida
    Posts
    941

    Re: While + response.getWriter()

    What error is shown ?
    Thanks,
    Ekta

  3. #3
    Registered User
    Join Date
    Aug 2010
    Posts
    23

    Re: While + response.getWriter()

    actually it is running, but when the execution reaches this operation it gives:
    java.lang.nullpointerexception at this line.

Similar Threads

  1. response
    By shaii in forum [Closed] Publishing to Nokia Store
    Replies: 6
    Last Post: 2010-07-29, 07:27
  2. Not able to get response back while http get with S60
    By rishabh1 in forum Mobile Java Tools & SDKs
    Replies: 3
    Last Post: 2010-04-29, 05:56
  3. Replies: 4
    Last Post: 2009-09-07, 10:51
  4. Replies: 6
    Last Post: 2009-06-30, 04:42
  5. InputStream Problem using Nokia 6235 while reading a response
    By sirishak in forum Mobile Java General
    Replies: 0
    Last Post: 2006-03-09, 07:17

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×