Yes.I have already done it by this way. But it isn't elegant,and I think others may need the same thing.If everyone need the same thing,why not support it? Why every time we need to implement the same thing? For example,struts 1.1 didn't support MappingDispatchAction.So if I use DispatchAction,I spend so much time to implement my own MappingDispatchAction.And others may do the same.In struts 1.2,it support MappingDispatchAction,I am very happy.
By the way,whether you implement it or not,do you think may idea is useful or not? ====================================================== Benjamin Tomasini wrote: > Here is what I have done. > > 1) Extend RequestProcessor and register it in Struts > config. > 2) Override processPreprocess(...) > 3) Put code in there that does what you need to do > for access control. > > I propose that Struts already gives you what you > need to do this. > > The challenge is that Struts doesn't handle the kind > of IoC and other > dynamic delegation and interceptor stacks like > Webwork does, for > instance. So adding this kind of declarative or > generic feature set for > access control to the core Struts code tends to push > the envelope a bit, > since things are pretty tightly bound. > > Ben > > On Sat, 2004-09-25 at 22:11, ji liu wrote: > > Thanks everyone. > > Joe Germuska wrote: > > > > >I think that the problem here is that access > control > > >is a pretty > > >multifaceted and potentially complex aspect of an > > >application, and > > >one which is most likely to need to integrate > >with > > "home-grown" > > >systems. I would be happy to look at a proposed > > >API/configuration > > >format and to consider how to make Struts work > well > > >with that, but I > > >think it would be a great challenge to come up > with > > >a "universal" API > > >for it. > > > > I don't think you need to implement a "universal" > API. > > You only need to implement a mechanism which makes > > struts users easy integrate their "home-grown" > access > > control system. > > > > Struts has already support the base authorization > of > > J2EE.Why not support access control? I don't mean > to > > provide a api,but a simple config,just like I have > > proposed. > > > > I write my own classes to check the access > rights,and > > write the config to integrate these to struts.Why > I > > want to integrate these to struts?Because struts > does > > a lot of useful work for me,and I can take > advantage > > of this.For example,I can use formbeans in my > access > > checking class! > > > > Why I don't want to use other framework to do > > this?Because I already have a lot of frameworks > used > > in my projects,and there are a lot of config xml > > files. > > Access control system will protect every URL in > the > > application.So I need to config it.But I already > > config the path in strtuts action mapping.If > action > > mapping in struts is changed,for instance the path > > element is changed,I have to change the config > file > > which is used by my access control system. > > > > If you can do a little work to support this,it > will be > > more easy.In fact,it will not need so much time. > > > > Thanks Michael McGrady,he give me some links.In > these > > links, I know there are many people really nead > the > > kind of mechanism. > > > > Do this in a simple way,just like the filter.In > > fact,my design is inspired by the filter.Though > filter > > can do this,but my approach can utilize the struts > > which already do some work for me.At least I can > > utilize the struts-config.xml,and no need to write > > another config file. > > > > > > > > ===== > > Ji Liu > > > > > _________________________________________________________ > > Do You Yahoo!? > > 150万曲MP3疯狂搜,带您闯入音乐殿堂 > > > http://cn.rd.yahoo.com/mail_cn/tag/yisou/music/*http://music.yisou.com/ > > 美女明星应有尽有,搜遍美图、艳图和酷图 > > > http://cn.rd.yahoo.com/mail_cn/tag/yisou/image/*http://image.yisou.com > > 1G就是1000兆,雅虎电邮自助扩容! > > > http://cn.rd.yahoo.com/mail_cn/tag/1g/*http://cn.mail.yahoo.com/event/mail_1g/ > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: > [EMAIL PROTECTED] > > For additional commands, e-mail: > [EMAIL PROTECTED] > -- > Benjamin Tomasini > NetEverything, Inc. > 1-877-270-1391 > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > > ===== Ji Liu _________________________________________________________ Do You Yahoo!? 150万曲MP3疯狂搜,带您闯入音乐殿堂 http://cn.rd.yahoo.com/mail_cn/tag/yisou/music/*http://music.yisou.com/ 美女明星应有尽有,搜遍美图、艳图和酷图 http://cn.rd.yahoo.com/mail_cn/tag/yisou/image/*http://image.yisou.com 1G就是1000兆,雅虎电邮自助扩容! http://cn.rd.yahoo.com/mail_cn/tag/1g/*http://cn.mail.yahoo.com/event/mail_1g/ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]