org.seasar.cubby.action
クラス Forward

java.lang.Object
  上位を拡張 org.seasar.cubby.action.Forward
すべての実装されたインタフェース:
ActionResult

public class Forward
extends Object

指定されたパスにフォワードする ActionResult です。

アクションメソッドの戻り値としてこのインスタンスを指定することで、指定されたパスにフォワードします。

使用例1 : フォワード先を相対パスで指定

 return new Forward("list.jsp");
 

使用例2 : フォワード先を絶対パスで指定

 return new Forward("/todo/list.jsp");
 

また、フォワードの前処理として prerender(ActionContext, HttpServletRequest) によって、リクエストにいくつかの属性が設定されます。

作成者:
baba

コンストラクタの概要
Forward(String path)
          インスタンスを生成します。
 
メソッドの概要
 void execute(ActionContext context, HttpServletRequest request, HttpServletResponse response)
          処理を実行します。
 void prerender(ActionContext context, HttpServletRequest request)
          フォワード前の処理を行います。
 
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

コンストラクタの詳細

Forward

public Forward(String path)
インスタンスを生成します。

パラメータ:
path - フォワード先のパス
メソッドの詳細

execute

public void execute(ActionContext context,
                    HttpServletRequest request,
                    HttpServletResponse response)
             throws ServletException,
                    IOException
インタフェース ActionResult の記述:
処理を実行します。

パラメータ:
context - アクションコンテキスト
request - リクエスト
response - レスポンス
例外:
ServletException
IOException

prerender

public void prerender(ActionContext context,
                      HttpServletRequest request)
フォワード前の処理を行います。

以下の処理を行います。

定義:
インタフェース ActionResult 内の prerender
パラメータ:
context - アクションコンテキスト
request - リクエスト


Copyright ツゥ 2006-2007 The Seasar Foundation and the others. All rights reserved.. All Rights Reserved.