Forums Register Login

HFJS-page 43

+Pie Number of slices to send: Send
Hi Guys,

I'm the new one to join this group..This site just rocks..

I have completed my SCJP certification and currently preparing for SCWCD. And bought HFJS book. I'm still at the start of this book and got this doubt. On page 43, it is mentioned that its the container that converts the resposed object into HTTP response and sends it back to the client.

However on page 62 the answer for Converts a response object to an HTTP response is given as the Web Server.

I would like someone to clarify this to me.

Thanks,
Prets.
+Pie Number of slices to send: Send
Hi,

Welcome aboard.

I don't have the book in front of me so I may be wrong, however I am guessing that the Authors are assuming that the web server is also the container, as in Tomcat. I think they base all their examples on Tomcat as it is the reference implementation for JSP 2.0 and Servlets 2.4.

If the web server and the container are not the same then the process is as follows

client -> web server (sends request)
web server -> container (passes request through)
container processes request
cotainer -> web server (generally passes a web page and associated headers back, headers may be cookies etc)
web server -> sends response back to client.

The Web Server cannot convert a Response object to html unless it is also the container, it not even guaranteed to be a java app (and in most cases isn't).

HTH

Mat
See ya later boys, I think I'm in love. Oh wait, she's just a tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 362 times.
Similar Threads
About the response object
who converts response object into Http response? container or web server?
HF: Error on page 62 (Exercise Solutions) ?
request - service()
Which one is the correct answer ( HFS) please clear
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 07:50:05.