• Post Reply Bookmark Topic Watch Topic
  • New Topic

Server servlet that can access client�s parameters

 
David Ayo
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am having problem accessing an xml client�s parameters. I tried to use InputStream and OutputStream so as to read and send the output back to the requestor but it compiles well but will gives this error on the tomcat server "java.lang.IllegalStateException: getWriter() ".
Can any one help me?I have tried so solve the problem but couldn�t get it working. The code is here below:



Any suggestion or correction is highly wellcome.
David

[EDIT - code tags and formatting]
[ June 08, 2005: Message edited by: David O'Meara ]
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Without knowing the line the exception is thrown from, it looks like you're trying to access both the writer and output stream on the reponse, but you're not allowed to.
From the API:
getOutputStream
Either this method or getWriter() may be called to write the body, not both.
getWriter
Either this method or getOutputStream() may be called to write the body, not both.

Dave.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!