Struts Flow

http://struts.apache.org/flow/index.html

あー、私の脳内フレームワーク(http://d.hatena.ne.jp/NetPenguin/20050309#1110388436)の特徴の一つと同じっぽい・・・

function login() {
  userManager = struts.applicationScope["userManager"];
  error = "";
  while (struts.sessionScope["curUser"] == null) {
    forwardAndWait("loginForm", {"error" : error});
    user = struts.param["user"];
    passwd = struts.param["passwd"];
    if (userManager.login(user, passwd)) {
      struts.sessionScope["curUser"] = user;
    } else {
      error = "Invalid login, please try again";
    }
  }
} 

The forwardAndWait() method sends an HTML page to the user and waits for a response. When the form is submitted, Struts Flow restores the variable values and restarts the script where it left off. There are more detailed examples in the Examples section.

forwardAndWait メソッドでクライアントにHTMLページを送って、クライアントからサブミットがくるまで待つってところが・・・脳内のままにしないで、早く作ってしまえばよかった・・・
StrtusFlow は上記のような制御を行なうためにサーバサイドのスクリプト(JavaScriptとか)を使用する模様。

ただ、Struts の枠組みの上に載せるためか、画面との入出力がいけてないと感じる。
脳内フレームワーク、まだ、勝てるかも。