struts-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Struts Wiki] Update of "StateManagement" by MichaelJouravlev
Date Wed, 19 Jul 2006 20:29:07 GMT
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/StateManagement

------------------------------------------------------------------------------
  
  Best fit: non-critical information about a particular client, session, or application. Usually
employed for user profiling, like zip code or preferred language. Also used for "remember
me" login.
  
+ How Struts can help:
+  * Struts does not have functions specific to storing state in cookies.
+  * Struts helps to maintain session if cookies are not enabled. Struts automatically calls
{{{response.encodeURL()}}} when processing <html:form> and <html:link> tags. This
tells server to add session ID to links and HTML forms.
  
  == Rewritten URLs ==
  
@@ -86, +89 @@

   * State is tied to page address.
  
  Best fit: applications where the query string only affects the view, like online catalogs
or magazines. A page can be reloaded without affecting the server and without POSTDATA messages.
Navigating back and forward is not an issue.
- 
  
  === Clean URLs ===
  
@@ -163, +165 @@

  
  Implications: Application must provide explicit navigational links and buttons so users
would not have to use standard browser navigation buttons. Application must recognize and
handle double-submit situations. 
  
+ How Struts can help:
+  * Use [http://struts.apache.org/1.x/struts-taglib/tlddoc/html/hidden.html <html:hidden>
tag] to store hidden field information and to submit it to location specified in <html:form>
tag.
+  * Use [http://struts.apache.org/1.2.9/api/org/apache/struts/util/TokenProcessor.html TokenProcessor
class] to distinguish resubmits.
+ 
  == Browser objects (DOM elements, Javascript variables, Flash storage) ==
  Pro:
   * Can store complex structures and objects.
@@ -175, +181 @@

   * Lost when a page is reloaded unless special care is taken.
  
  Best fit: Ajax-style Single Page applications.
+ 
+ How Struts can help:
+  * Struts does not have built-in features for saving state in client DOM/Javascript objects.
+ 
+ Additional information:
+  * [http://codinginparadise.org/weblog/2005/08/ajax-tutorial-saving-session-across.html
Saving Session Across Page Loads Without Cookies, On The Client Side] -- tutorial by Brad
Neuberg
  
  == Server session object ==
  

Mime
View raw message