jsp - Confusion concerning a popular explaination of the HTTP request lifecycle -
once server fulfills request , response returned client, request , attributes no longer available client , can garbage-collected jvm.
from: programming djakarta struts, sec edition chuck cavaness
questions:
doesn't author mean, "the request , attributes no longer available server?" client origination endpoint.
the garbage collector cleans-up heap memory available server jvm. browser (client) doesn't utilize heap.
the request attributes integrated httpservletrequest object web container.
when httpservletrequest , httpservletresponse objects garbage collected?
isn't lifecycle of http request on @ moment http response sent client? lifecycle doesn't include client response?
doesn't author mean, "the request , attributes no longer available server?" client origination endpoint.
the request (and attributes) java objects handled in server, client sent request. that's why author may refer request belongs client , not server. after processing request, has no utilize dropped (http concept), in java web server, servletrequest
object (usually handled httpservletrequest
) resides in server no longer available, garbage collected.
the garbage collector cleans-up heap memory available server jvm. browser (client) doesn't utilize heap.
answered in lastly part of 1st answer.
the request attributes integrated httpservletrequest object web container.
you confuse attributes http request (get, post, etc) , httpservletrequest
attributes can accessed through httpservletrequest#getattribute(string)
. can access http request attributes character encoding, content type , request parameters using functions in provided links, can know other http attributes using other functions in httpservletrequest
interface.
when httpservletrequest , httpservletresponse objects garbage collected?
after http response committed , finished. please refer how servlets work? instantiation, session variables , multithreading
isn't lifecycle of http request on @ moment http response sent client? lifecycle doesn't include client response?
once response gets client, it's client decide it. note can have: ajax requests, total http requests, resource requests (for js, css , images, example), portlet requests...
jsp http servlets
No comments:
Post a Comment