 |
| |
| META TOPICPARENT | name="WebHome" |
Changes | Index | Search | Go <-- This creates the navigation links to : Home | Help | Index | etc. --> | WebNotify
Url Rewrite Filter | |
< < | | > > | | | | | |
> > | | | | | |
< < | Based on the popular and very useful
mod_rewrite for apache,
UrlRewriteFilter is a Java Web Filter for any J2EE? compliant web application server
(such as Resin, Orion or
Tomcat), which allows you to rewrite URLs
before they get to your code. It is a very powerful tool just like Apache's mod_rewrite. | > > | https://urlrewrite.dev.java.net/ | | | | |
< < | Url Rewriting is very common when using the Apache Web Server (see
mod_rewrite's rewriting guide) but has not
been possible in most web application servers. The main things it is used for are:
- URL Tidyness - keep URLs tidy irrespective of the underlying technology or framework (JSP, Servlet, Struts etc).
- Browser Detection - Allows you to rewrite URLs based on request
HTTP headers (such as user-agent or charset).
- Date based rewriting - Allows you to forward or redirect to other URL's based on the date/time (good for planned outages).
- Moved content - enable a graceful move of content or even a change in CMS.
UrlRewriteFilter uses an xml file, called urlrewrite.xml (lives in the WEB-INF directory), for configuration.
Most parameters can be Perl5 style Regular Expressions. This makes it very powerful indeed.
It uses libraries from Apache Jakarta
(Commons Digester and
Oro).
Version 1.1 latest release
- Download the zip/tar.gz and extract it into your WEB-INF directory.
- Add the following to your WEB-INF/web.xml (add it near the top above your
servlet mappings (if you have any)): (see for more options)
<filter>
<filter-name>UrlRewriteFilter</filter-name>
<filter-class>org.tuckey.web.filters.urlrewrite.UrlRewriteFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>UrlRewriteFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
- Add your own configuration to the WEB-INF/urlrewrite.xml that was created.
- Restart the context.
You can visit http://127.0.0.1:8080/rewrite-status
(or whatever the address of your local webapp)
to see output (note: this page is only viewable from localhost and it outputs
plain text so it's easy to use remotely from lynx or wget.
Changes
For in-depth details see CVS.
- 4-2004 - created java.net project move to java.net wiki from old homepage - http://tuckey.org/urlrewrite/
- 1.1 (4/2004) - Ability to disable rules, Refactored to enable rewriter to be embedded, changed logging to enable log level to be set, added name and note elements to rule for documentation, ability to disable status page, ability to change status prefix, javadoc style ant task for an HTML configuration report.
- 1.0 (3/2004) - General tidy up of logging, tidy up of all code, dist now includes manual, log4j and junit removed from bin release.
- 0.9 (2/2004) - Fixed conf loading problem in Resin, resolved concurrency issue with Perl5Compiler? and Perl5Matcher? (thanks Scott Askew!)
- 0.8 (2/2004) - Removed dependency on "Commons Lang", Changed DTD path (bug fix), added ability to put time fields in "condition" element, added ability to put "operators" in the "condition" element, fixed multiple rules issue (bug fix)
- 0.7 (11/2003) - Improved test cases, documentation
- 0.6 (8/2003) - Improved error handling, status page and condition matching
- 0.5 (6/2003) - Improved configuration error handling
License
UrlRewriteFilter is distributed under the BSD License. For more information on the BSD license see
opensource.org/licenses.
Mentions & Related
-- Main.ptuckey - 20 Apr 2004 | | |
| META TOPICMOVED | by="ptuckey" date="1082453817" from="Javawsxml.UrlrewriteProject" to="Javawsxml.UrlRewriteFilter" |
|
| |
| META TOPICPARENT | name="WebHome" |
Url Rewrite Filter | |
< < | | > > | | | | Based on the popular and very useful
mod_rewrite for apache, | | | | |
< < | Download & Installation | > > | | | | Version 1.1 latest release | | | plain text so it's easy to use remotely from lynx or wget. | |
< < | Changes | > > | Changes
For in-depth details see CVS. | | | | |
< < | 1.1 (4/2004) - Ability to disable rules, Refactored to enable rewriter to be embedded,
changed logging to enable log level to be set, added name and note elements to rule for documentation,
ability to disable status page, ability to change status prefix, javadoc style ant task for an HTML
configuration report.
1.0 (3/2004) - General tidy up of logging, tidy up of all code, dist now includes manual, log4j and junit removed from
bin release.
0.9 (2/2004) - Fixed conf loading problem in Resin, resolved concurrency issue with Perl5Compiler? and Perl5Matcher?
(thanks Scott Askew!)
0.8 (2/2004) - Removed dependency on "Commons Lang", Changed DTD path (bug fix), added ability to put time fields
in
"condition" element, added ability to put "operators" in the "condition" element, fixed multiple rules issue (bug fix)
0.7 (11/2003) - Improved test cases, documentation
0.6 (8/2003) - Improved error handling, status page and condition matching
0.5 (6/2003) - Improved configuration error handling
| > > |
- 4-2004 - created java.net project move to java.net wiki from old homepage - http://tuckey.org/urlrewrite/
- 1.1 (4/2004) - Ability to disable rules, Refactored to enable rewriter to be embedded, changed logging to enable log level to be set, added name and note elements to rule for documentation, ability to disable status page, ability to change status prefix, javadoc style ant task for an HTML configuration report.
- 1.0 (3/2004) - General tidy up of logging, tidy up of all code, dist now includes manual, log4j and junit removed from bin release.
- 0.9 (2/2004) - Fixed conf loading problem in Resin, resolved concurrency issue with Perl5Compiler? and Perl5Matcher? (thanks Scott Askew!)
- 0.8 (2/2004) - Removed dependency on "Commons Lang", Changed DTD path (bug fix), added ability to put time fields in "condition" element, added ability to put "operators" in the "condition" element, fixed multiple rules issue (bug fix)
- 0.7 (11/2003) - Improved test cases, documentation
- 0.6 (8/2003) - Improved error handling, status page and condition matching
- 0.5 (6/2003) - Improved configuration error handling
| | | | |
< < | License | > > | License | | | UrlRewriteFilter is distributed under the BSD License. For more information on the BSD license see
opensource.org/licenses.
Mentions & Related | |
< < | | > > | | | | |
|
> > |
| META TOPICPARENT | name="WebHome" |
Url Rewrite Filter
Based on the popular and very useful
mod_rewrite for apache,
UrlRewriteFilter is a Java Web Filter for any J2EE? compliant web application server
(such as Resin, Orion or
Tomcat), which allows you to rewrite URLs
before they get to your code. It is a very powerful tool just like Apache's mod_rewrite.
Url Rewriting is very common when using the Apache Web Server (see
mod_rewrite's rewriting guide) but has not
been possible in most web application servers. The main things it is used for are:
- URL Tidyness - keep URLs tidy irrespective of the underlying technology or framework (JSP, Servlet, Struts etc).
- Browser Detection - Allows you to rewrite URLs based on request
HTTP headers (such as user-agent or charset).
- Date based rewriting - Allows you to forward or redirect to other URL's based on the date/time (good for planned outages).
- Moved content - enable a graceful move of content or even a change in CMS.
UrlRewriteFilter uses an xml file, called urlrewrite.xml (lives in the WEB-INF directory), for configuration.
Most parameters can be Perl5 style Regular Expressions. This makes it very powerful indeed.
It uses libraries from Apache Jakarta
(Commons Digester and
Oro).
Download & Installation
Version 1.1 latest release
- Download the zip/tar.gz and extract it into your WEB-INF directory.
- Add the following to your WEB-INF/web.xml (add it near the top above your
servlet mappings (if you have any)): (see for more options)
<filter>
<filter-name>UrlRewriteFilter</filter-name>
<filter-class>org.tuckey.web.filters.urlrewrite.UrlRewriteFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>UrlRewriteFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
- Add your own configuration to the WEB-INF/urlrewrite.xml that was created.
- Restart the context.
You can visit http://127.0.0.1:8080/rewrite-status
(or whatever the address of your local webapp)
to see output (note: this page is only viewable from localhost and it outputs
plain text so it's easy to use remotely from lynx or wget.
Changes
1.1 (4/2004) - Ability to disable rules, Refactored to enable rewriter to be embedded,
changed logging to enable log level to be set, added name and note elements to rule for documentation,
ability to disable status page, ability to change status prefix, javadoc style ant task for an HTML
configuration report.
1.0 (3/2004) - General tidy up of logging, tidy up of all code, dist now includes manual, log4j and junit removed from
bin release.
0.9 (2/2004) - Fixed conf loading problem in Resin, resolved concurrency issue with Perl5Compiler? and Perl5Matcher?
(thanks Scott Askew!)
0.8 (2/2004) - Removed dependency on "Commons Lang", Changed DTD path (bug fix), added ability to put time fields
in
"condition" element, added ability to put "operators" in the "condition" element, fixed multiple rules issue (bug fix)
0.7 (11/2003) - Improved test cases, documentation
0.6 (8/2003) - Improved error handling, status page and condition matching
0.5 (6/2003) - Improved configuration error handling
License
UrlRewriteFilter is distributed under the BSD License. For more information on the BSD license see
opensource.org/licenses.
Mentions & Related
-- Main.ptuckey - 20 Apr 2004
| META TOPICMOVED | by="ptuckey" date="1082453817" from="Javawsxml.UrlrewriteProject" to="Javawsxml.UrlRewriteFilter" |
|
|