Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Response obj in Init method  RSS feed

 
Parameswaran Thangavel
Ranch Hand
Posts: 485
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all
can i able to get the http response obj in int method of the servlet.
this is to get the PrintWriter object to debug the flow of the servlet.
 
David Ulicny
Ranch Hand
Posts: 724
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, but you should be able to write to System.out .
 
Satheesh Satti
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No...
Container calls the init method on the servlet to move it from the loaded state to initialized state and then container passes the request and response objects to the service methods for each request.
Hence at this point of time servlet doesnot have access to the response object.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!