File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

why service() accepts HttpServletResponse

 
vianyrajnish rajnish
Ranch Hand
Posts: 70
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,

i like to know .. why service() accepts httpservletrequest and httpservletresponse both ....when only httpservletrequest is enough..?



please reply me anyone

thanks,
vinay rajnish
 
Vishal Matere
Ranch Hand
Posts: 81
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Because service() ultimately calls doGet()/doPost() methods which needs response object to send response to client.

Alternatively user can overide service() method and can write his own code to return response.

HTH
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64190
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If the request is "enough" how would you propose that a servlet writes output to the response and/or set headers?
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic