My favorites | Sign in
t-2
Project Home Downloads Wiki Issues Source
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions
Issue 224: @Pageが/なクラスで、適切なパスマッチングがされていない。
1 person starred this issue and may be notified of changes. Back to list
Status:  Fixed
Owner:  shinpei.ohtani@gmail.com
Closed:  Jun 2009


 
Project Member Reported by shinpei.ohtani@gmail.com, Jun 14, 2009

{{{
@Page("/")
public class TopPage {
  @Default
  @ActionPath("index.html")
  public Navigation index(final WebContext context) { ... }

  @ActionPath("page1.html")
  public Navigation page1(final WebContext context) { ... }
}
}}}

このようなクラスでテストしたのですが、結果以下のようになりました。
1.http://hoge.appspot.com/ -> indexメソッドが実行される。
2.http://hoge.appspot.com/index.html -> どのメソッドも実行されず404エラー
3.http://hoge.appspot.com/page1.html -> どのメソッドも実行されず404エラー

上記2、3のURLでアクセスされた場合になんらかの処理をさせたい場合は、
@Page("index.html")や@Page("page1.html")を付加したクラスを作成したほうがよ
いでしょうか?
(クラスを作成した場合は正常に動作することを確認しました。)
Jun 15, 2009
Project Member #1 shinpei.ohtani@gmail.com

原則、ページパスをつけて処理するのが基本方針です。
これからあまりに逸脱しないようにしていくほうが良いと考えます。

そのため上記の場合では、各htmlでPageを分けるか、
共通のページパスをつくりそこに対してアクセスするようにするのがやりやすい形式です。
Jun 19, 2009
Project Member #2 shinpei.ohtani@gmail.com

この件、T2側の問題点があったので修正しました。
r4118です。
Status: Fixed

Powered by Google Project Hosting