This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

See this code it gives exception

 
Markandey Sahu
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
Renu Radhika
Ranch Hand
Posts: 243
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The problem is that this is a JSP.A JSP when converted to Servlet,its service method will define the implicit objects on its own.As you know out is an implicit object and it is got by calling getWriter() method on the response,since on the same response object you cannot call getWriter and getOutputStream,its giving you this error.In servlet you wont get the same error but outputStream is for writing binarydata for character data you have to use getWriter method
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic