Win a copy of The Java Performance Companion this week in the Performance 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