[Seasar-user:14590] 【SAStruts】パラメータ付URLをクリックして、元の画面に遷移する場合は、リダイレクトが必須でしょうか?
    Masaru Ono
    [E-MAIL ADDRESS DELETED]
       
    2008年 6月  6日 (金) 19:02:18 JST
    
    
  
度々すいません、尾野です。
パラメータ付URLをクリックして、元の画面に遷移する場合は、リダイレクトが必須でしょうか?
例えば、
一覧画面にある「削除リンク」をクリックして、
再描画して、一覧画面を表示するケースがある場合です。
	@Execute(validator = false, urlPattern = "delete/{key}")
	public String delete() {
		Condition condition = jdbcManager.from(Condition.class).id(conditionDto.key).getSingleResult();
		int i = jdbcManager.delete(condition).execute();
		System.out.println("削除した件数:" + i);
		return "index";		// NGケース(フォワードする場合)
		//return "index?redirect=true";	// OKケース(リダイレクトする場合)
	}
フォワードの場合、画面に描画されるURLが以下のようになります。
初期表示のURL		:delete/1
フォワード後のURL	:delete/delete/1
# Employeeの編集画面からの「戻るボタン」で、index.jspにフォワードしていますが、うまく動作しています。
# 一覧画面(/employee/) >> Employeeの編集画面(/employee/edit/1/ALLEN) >> 一覧画面(/employee/)
    
    
Seasar-user メーリングリストの案内