| Author |
Implementing Django URLs dispatching style in Servlets
|
Hussein Baghdadi
clojure forum advocate
Bartender
Joined: Nov 08, 2003
Posts: 3359
|
|
Hi,
I'm considering creating my own Java web framework that mimics Django actions routing.
Django uses regular expressions for matching URLs with actions:
I don't have any code yet, just discussing things in my mind, here is my initial plan:
A Servlet filter is needed to intercept requests, this filter has a set of listed RegEx patterns. correct till now?
Lets say the application will have a big RegEx set, how to dispatch as fast as possible? it doesn't make sense to try to evaluate every RegEx in turn.
Thanks for help and time.
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56233
|
|
Not much to do with servlets, so I'll move this to Performance.
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
jijun lx
Greenhorn
Joined: Jul 12, 2011
Posts: 4
|
|
maybe the UrlRewriteFilter will help you partially .
http://code.google.com/p/urlrewritefilter/
|
------
Best regards
Jijun
|
 |
 |
|
|
subject: Implementing Django URLs dispatching style in Servlets
|
|
|