今日の成果。
分る人にだけ分るニャキニャキ。
public abstract class CommentAction { public static final Class BEAN = CommentEntity.class; /** * 入力情報 : ユーザ名 */ private String user; /** * 入力情報 : コメント */ private String comment; private BasicDxo dxo = null; public CommentAction() { super(); } public String execute() { CommentEntity entity = (CommentEntity)dxo.convert(this,CommentEntity.class); insert(entity); // この中でまぁ、色々。 return "hoge"; // テンプレート名 [CommentAction_hoge.vmが動く] // return "forward:/moge.jsp"; // フォワード // return "redirect:http://www.google.co.jp"; // リダイレクト // return "redirect:/moge.jsp"; // 同一コンテキストでリダイレクト // return "redirect:/moge.jsp(comment,user)"; // 同一コンテキストでリダイレクト // return "redirect:/moge.jsp?comment&user"; // 同一コンテキストでリダイレクト // return "redirect:/moge.jsp?cmt=${comment}&usr=${user}"; // 同一コンテキストでリダイレクト } public abstract List getComments(); public abstract void insert(CommentEntity entity); // 後、アクセサ。 }