Error in my servlet


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 5 of 5

Thread: Error in my servlet

  1. #1
    Join Date
    Jul 2007
    Posts
    3

    Error in my servlet

    I m invoking a servlet url using HTTPConnection class from my class.
    i got this error::::
    java.lang.IllegalStateException: getOutputStream() has already been called for this response

    Any help appriciated .....

  2. #2
    Join Date
    Jan 2007
    Location
    India
    Posts
    12

    Post Re

    Hi Mohan

    This may be due to you may have called early the getOutputStream() or may be internally it 'll be called.

    If you paste relevant code, It can identify what the problem is much easier.
    With Regards
    Anand

  3. #3
    Join Date
    Jul 2007
    Posts
    3
    Yes , getOutputStream() is called twice cause the error.it was solved.
    now i want to get the data from HTTPResponse for the request.

    any idea???
    -----------------------
    Mohan

  4. #4
    Join Date
    Jan 2007
    Location
    India
    Posts
    12

    Post Re

    You can use the getInputStream() for that

    This will return an InputStream Object & you can read data from that
    With Regards
    Anand

  5. #5
    Join Date
    Jul 2007
    Posts
    3
    Nice. i got it . Thanks for ur suggestion.

    ++++++++++++++++++++++++++++++++
    Mohan
    ++++++++++++++++++++++++++++++++

Similar Threads

  1. Replies: 2
    Last Post: 02-05-2006, 02:04 AM
  2. SQL Help and Servlet help
    By trixma in forum Java
    Replies: 4
    Last Post: 09-09-2005, 08:12 AM
  3. Servlet Help
    By trixma in forum Java
    Replies: 4
    Last Post: 09-04-2005, 11:10 PM
  4. typical problem, pls help
    By SATISH in forum Java
    Replies: 1
    Last Post: 09-29-2000, 09:33 AM
  5. Replies: 0
    Last Post: 04-04-2000, 04:28 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center