• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Request & Response parameters

 
Ranch Hand
Posts: 312
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
reply
    Bookmark Topic Watch Topic
  • New Topic