• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • Devaka Cooray
Saloon Keepers:
  • Ganesh Patekar
  • Tim Moores
  • Carey Brown
  • Stephan van Hulst
  • salvin francis
Bartenders:
  • Ron McLeod
  • Frits Walraven
  • Pete Letkeman

Request & Response parameters  RSS feed

 
Ranch Hand
Posts: 312
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

Actually this is an interview question. Who creates the request & response parameters that are passed to the service method.

If we have a service as well as doGet method in our servlet which one will be called to cater to the request of the client. Will both be called or no.



Rgrds
Manish
 
Ranch Hand
Posts: 4982
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


Actually this is an interview question. Who creates the request & response parameters that are passed to the service method.


The Web Server or the Container.


If we have a service as well as doGet method in our servlet which one will be called to cater to the request of the client. Will both be called or no.


The service will be called anyway. Depends on the method of the form (POST or GET) (by assuming that you havent overrided the service method), the corresponding do method (doGet() or doPost()) will be invoked.

Nick
[ October 04, 2004: Message edited by: Nicholas Cheung ]
 
Ranch Hand
Posts: 209
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Who creates the request & response parameters that are passed to the service method.



I guess here we are talking of HTTPServletRequest and HTTPServletResponse. Therefore, it is responsibility of a web container to create these objects.


[ October 04, 2004: Message edited by: Alex Sharkoff ]
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!