Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

configurate filter mapping to different servlet and action

 
Haulyn Jason
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64688
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"sahara bear", please check your private messages for an important administrative matter.
 
Haulyn Jason
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Oh, I am sorry about that!
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you going to correct your display name?
 
Haulyn Jason
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am not sure is it ok now? I changed my profile. I am sorry.
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The name is fine now, thanks.
 
Haulyn Jason
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am sorry for my mistake,
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic