This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes See this code it gives exception Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "See this code it gives exception" Watch "See this code it gives exception" New topic
Author

See this code it gives exception

Markandey Sahu
Greenhorn

Joined: Jun 29, 2006
Posts: 13
Renu Radhika
Ranch Hand

Joined: Oct 21, 2005
Posts: 243
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: See this code it gives exception
 
Similar Threads
Javascript document object writes in a new page?
See this code why it gives exception
not working on ie
Which is parsed first in a JSP page - EL, taglib or scriplets
Attempt to clear a buffer that's already been flushed