This week's book giveaway is in the Agile and other Processes forum. We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line! See this thread for details.
configurate filter mapping to different servlet and action
Haulyn Jason
Ranch Hand
Joined: Jul 24, 2007
Posts: 37
posted
0
Hi, all:
I have to maintain a legacy projet, it's based on struts and servlet. All the path is configurate to root, like: /userLogin /membreLogin /other. And, there are two different member system, I mean that, I want a filter mapping to :/a.do /b.do /c.do, another filter mapping to /e.do /f.do and /h.do. Is it possible? I have more than 10000 actions!
I'd like to configurate in web.xml, but I do not know how can my filter seperate different actions?
Thanks!
Mama always said, "Life is like a box of chocolates; you never know what you're gonna get. And then you have to get medieval on somebody's buttocks."
http://www.haulynjason.net/
You need a FrontController, which you would need for actions anyway.
You map the Front Controller once, eg to /*.do and then it receives requests and redirects to the required Action. @see Struts.
Haulyn Jason
Ranch Hand
Joined: Jul 24, 2007
Posts: 37
posted
0
Thanks very much, I find it's impossible to do what I want. Now I create a filterService, and invoke the filterService.check(request) in the filter. then configurate actions in an xml file. it works well.