You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@struts.apache.org by Apache Wiki <wi...@apache.org> on 2006/07/20 23:10:29 UTC

[Struts Wiki] Update of "StrutsNavigationBasics" by MichaelJouravlev

Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Struts Wiki" for change notification.

The following page has been changed by MichaelJouravlev:
http://wiki.apache.org/struts/StrutsNavigationBasics

New page:
== Navigation Between Pages ==
A typical web application is a collection of web resources linked with each other. When using Struts, every web resource is represented with one or more action classes and form beans. When web resource is asked to render itself, a corresponding action class selects a view that reflects current state of the web resource, and sends it to the browser. 

Struts approach is different from page-oriented framewors like ASP.NET, where a user requests a page, and web server displays that page. In ASP.NET web resource is equal to web page, while in Struts one web resource can have several corresponding web pages.

== Round Trip And Postback ==

When a user interacts with a web resource, the browser may respond to some of the user actions by executing client-side scripts while some other actions that require server resources must be sent for processing to the web server. When server-side processing is involved, a typical interactive user session consists of the following steps:

 1. The user requests a web resource from the web server.
 2. Struts selects an action class that handles requests to that web resource.
 3. The action class responds back with the page containing an HTML form.
 4. The user enters the data into HTML form and submits it to the web server.
 5. The action class processes the request, and sends the result back to the user.

The above interaction can be processed either with two different action classes or with one action class. 

If two different action classes are involved, then the action class that renders a page is called ''render action'', while the class that processes submitted data is called ''submit action''. 

If only one action class and one action form are used for both render and submit phases, then step 4 can also be referred to as a ''postback'', because input data is posted back to the same action that displayed the page.

Steps 4 and 5 are collectively referred to as a ''round trip''.

This model of execution allows a Web server to support a large number of clients because each client request occupies the server resources only for a short duration.