[Seasar-user:16135] Re: [SAStruts]/{ コンテキスト名}/{foo}/{bar}/{アクション名}/{id}というURIで呼び出すには

[E-MAIL ADDRESS DELETED] [E-MAIL ADDRESS DELETED]
2008年 10月 27日 (月) 15:12:18 JST


ショータローこと坪内様
ひが様

conpotaです。
回答ありがとうございました。

> このIndexActionでURLをrewriteするというテクニックは
> いろいろ使えます。

さっそく試してみました。これは便利ですね!


2008/10/27 15:06 Shotaro Tsubouchi <[E-MAIL ADDRESS DELETED]>:

> ショータローこと坪内です。
>
> > このIndexActionでURLをrewriteするというテクニックは
> > いろいろ使えます。
>
> なるほど、IndexAction でやればいいのか。
> 割り込みでしたけど勉強になりました。ありがとうございます。
>
>
> Yasuo Higa さんは書きました:
> > ひがです。
> >> conpotaです。回答ありがとうございます。
> >>> /{コンテキスト名}/{foo}/{bar}/{アクション名}/{id}
> >> foo,barは可変のもので、アクションクラスからそれを取得したいのです。
> >> 可能でしょうか?
> >>
> > IndexActionにアクション名と同じ名前のメソッドを
> > 下記のように作成し
> > @Execute(validator = false,
> >     urlPattern="{foo}/{bar}/アクション名/{id}")
> > public String アクション名() {
> >     return "/アクション名}/" +
> >         xxxForm.foo + "/" + xxxForm.bar + "/" + xxxForm.id;
> > }
> >
> > 目的のアクションクラスのindexメソッドを下記のようにすると
> > 大丈夫です。
> >
> > @Execute(validator = false,
> >     urlPattern="{foo}/{bar}/{id}")
> > public String index() {
> >     ...;
> > }
> >
> > このIndexActionでURLをrewriteするというテクニックは
> > いろいろ使えます。
> > _______________________________________________
> > Seasar-user mailing list
> > [E-MAIL ADDRESS DELETED]
> > https://ml.seasar.org/mailman/listinfo/seasar-user
> >
> _______________________________________________
> Seasar-user mailing list
> [E-MAIL ADDRESS DELETED]
> https://ml.seasar.org/mailman/listinfo/seasar-user
>



-- 
conpota <[E-MAIL ADDRESS DELETED]>
-------------- next part --------------
HTMLの添付ファイルを保管しました...
URL: <http://ml.seasar.org/archives/seasar-user/attachments/20081027/cadb48c3/attachment-0001.html>


Seasar-user メーリングリストの案内