We were trying out several approaches for url writing in j2ee container. (I know apache's mod_rewrite is obvious choice if using apache). There are two approaches we were discussing
1. Use RequestDispatcher.forward or RequestDispatcher.input methods (This approach is used by UrlRewriteFilter (http://tuckey.org/urlrewrite/))
2. Override HttpServletRequest (all the methods like getUri, getServletPath etc) and make it appear like mapped uri.

Are there any problems with approach 2? If we override methods like getUri, getServletPath etc, can it cause any issues.