Joe,

Again, model 1 or 2, the servlet is a server program. It's not that you can simply start a servlet which then displays a page. The output of a servlet is always in response to an HTTP request.

In model 2 simply more of the application code (like what page to display next) resides on the server. But it's still client/server.

You said "the SUBMIT button on the JSP page returns to the calling servlet.". It does not return. A SUBMIT is a request. It is the beginning of a request-reponse cycle, not the end. The framework simply assures that the SUBMIT request is delegated to the same servlet that produced the page containing the SUBMIT.



Date: Fri, 18 Jul 2008 09:27:32 -0500
From: joepluta@xxxxxxxxxxxxxxxxx
To: web400@xxxxxxxxxxxx
Subject: Re: [WEB400] The "Presentation" Layer

john e wrote:
Joe wrote:
he entire page-at-a-time browser interface all the way up to JSP Model
2 has been server/client


I don't understand. Whether page-at-a-time or ajax, it's always client/server and not server/client because the browser always initiates the request. The browser is under control. The server responds to requests, whether this is with a complete page or simply some data.

That's typically JSP Model 1. In JSP Model 2, the servlet on the host
puts data into the session, and then initiates the display of a specific
JSP page. That page is displayed to the user, who then hits a button to
submit the page back to the same servlet.

In JSP Model 1, each button on the screen initiates a request to a
different page. Frameworks like Struts attempted to externalize that
application flow to some degree, but it still wasn't quite the same.
With JSP Model 2, the control is moved entirely to the servlet. The
user simple enters data and hits a button; the application determines
the next page to display.

Having all application code on the server and "nothing" (i.e. only HTML) on the client doesn't make it server/client. It's just that you're entire application is structured as functions that are executed as a result of the browser (client) making requests.

Again, it's how you write the servlet. The primary characteristics of
JSP Model 2 are: the servlet identifies the page to display, and the
SUBMIT button on the JSP page returns to the calling servlet. These two
design components turn it from a rough client/server to server/client.


If the server outputs a complete page to the browser then this is a response to a request of the client. When done the server simply waits for the next request. This is different from server/client where the client program on the host is under control. It outputs a screen to the terminal whenever it wants to, not after receiving a request from the terminal.

Again, in JSP Model 2, the servlet is the controller. It determines the
next page to display.

Joe
--
This is the Web Enabling the AS400 / iSeries (WEB400) mailing list
To post a message email: WEB400@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/web400.


_________________________________________________________________
Jouw nieuws en entertainment, vind je op MSN.nl!
http://nl.msn.com/

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.