Re: html servlet flow



On Fri, 16 Jun 2006 16:47:46 GMT, "Oliver Wong" <owong@xxxxxxxxxxxxxx>
wrote:

"Jeff Kish" <kishjjrjj@xxxxxxxxxxx> wrote in message
news:ag34929iv6ciosf208sjg9tmh5l79ovuo2@xxxxxxxxxx

I'm still trying to get my head around what is going on between the
browser and Tomcat.

Still appreciate any elucidation, still studying.

The browser submits an HTTP request, and the server sends an HTTP
response. That response usually contains HTML, but it could respond with
anything (including images, flash animations, PDFs, etc.)

The server is free to send back any content it wants, and the browser is
free to submit any HTTP request it wants.

When writing websites, you have to provide enough information in your
responses so that the user can accomplish whatever tasks it is they want
done. You also have to take into account the fact that users are free to
send any request they want, and so you have to be able to handle
non-sensical requests and not assume requests will arrive in any particular
order or anything like that.

- Oliver
Thanks Oliver.

Is this right?

Say there is a hard coded jsp page, say:
mypage.jsp in the right dir under tomcat,
if the user types in the browswer address bar:
http://tomcat/jmypage.jsp

and presses return, then...

Then the browser packs up the 'mypage.jsp' and
formats it in the protocol of http, and send it to
the address (tomcat here).

Then tomcat recognizes the protocol, unpacks the
request, and sees "mypage.jsp".
Then it looks wherever it is legal for jsp pages to exist,
and starts processing the mypage.jsp?

If it is a simple page, it packs up the code/html in the jsp page into
the response and puts it in http format and sends it to the browser.

When the browser gets the response, it recognizes it is http, unpacks
it, and starts processing the html in the response.

And this 'response' isn't the response parameter in the doGet method,
it is just the general 'response' from the Tomcat.

Extra informatoin like headers etc are in the actual doget 'response'
variable.

Is this at all correct?

Thanks again


.



Relevant Pages

  • Re: Request for suggestions re: architecture of IntraNet/Socket app[s]
    ... Your Ajax routine could be used to call an ISAPI dll from the browser, ... Here is the Simple Java Servlet ... @param request servlet request ... @param response servlet response ...
    (borland.public.delphi.non-technical)
  • (not) caching with mod_expires
    ... trying to get our content to cache nicely at the browser. ... URL causes a conditional request and a 304 response. ... Expires: Wed, ...
    (comp.infosystems.www.servers.unix)
  • Re: HTTP header processing sequence
    ... when the browser gets the initial index.html page (or ... somehow matches each response with the corresponding request. ... more about how the browser match up all the responses send from the server ...
    (microsoft.public.win32.programmer.networks)
  • Re: HTTP header processing sequence
    ... HTTPWatch is doing that, not the browser. ... The browser issues a GET waits for response (no more GETs till it gets that ... server from the client. ... Initially it sends the request for the html ...
    (microsoft.public.win32.programmer.networks)
  • Re: Custom 401 page problems
    ... Since you configured IIS to send a staic for this ... Now, a 401 response comes back to the client, and the entite body is the ... it is going to make a new request for this resource ... What request do you think the browser makes to fetch the 401.gif ??? ...
    (microsoft.public.inetserver.iis)