Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create 4.x branch in preparation for a 4.0.5 release #262

Draft
wants to merge 61 commits into
base: 4.x
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
712ac35
setup for v5
paultuckey Nov 30, 2017
d107a40
setup for v5
paultuckey Nov 30, 2017
5467ba4
fix so that it actually works
paultuckey Nov 30, 2017
9e8c465
update cargo version
paultuckey Nov 30, 2017
3ed82c3
update tomcat version
paultuckey Nov 30, 2017
4bf4b48
Enable optional cookie forward mechanism in proxy mode
sytolk Jun 3, 2016
cdeeae6
request-filenam condition modicitions for HTML5 (tested on Payara Gla…
mkmayer Mar 10, 2016
1fe892e
request-filename condition modifications for HTML5 (tested on Payara …
mkmayer Mar 11, 2016
15bee38
#143 Fix any url pattern host replacement
Oct 2, 2015
f6389a9
Suggested fix for issue #224
fripoli Dec 12, 2017
f876e8f
Suggested fix for issue #224
fripoli Dec 13, 2017
0351f34
Fixed duplicate headers
grauds May 8, 2018
babe52c
Allow same condition variables in mod-rewrite style 'to' as in 'from'.
denuno Mar 11, 2018
b2ebba9
Fix case sensitivity, no substitution, and tabs in rule parsing of mo…
see-eff May 31, 2018
1846c25
Add unicode encoding
paultuckey Feb 26, 2019
1a60d6d
remove annotation tests
paultuckey Feb 26, 2019
b6fc5ca
Support config file from outside path
a-langer Sep 18, 2020
a44c328
Create FUNDING.yml
paultuckey Dec 16, 2020
9da0cf3
Create maven.yml
paultuckey Dec 16, 2020
e68ffc6
Bump junit from 4.9 to 4.13.1
dependabot[bot] Oct 13, 2020
e67cb24
Bump junit from 4.9 to 4.13.1 in /container-test
dependabot[bot] Oct 13, 2020
18ae0f1
Bump junit from 4.9 to 4.13.1 in /annotation
dependabot[bot] Oct 13, 2020
f80c954
Fix grammar issues
kasiagauza Aug 30, 2021
9f9b8c8
Update manual URL
paultuckey Dec 26, 2021
39c8c5d
Add gradle build
paultuckey Dec 26, 2021
c067b67
Update year, remove google group
paultuckey Dec 26, 2021
a48e2de
Update source and target version
paultuckey May 11, 2022
c9c4463
Stick with pom
paultuckey May 11, 2022
11c2bbf
Upgrade so we can at least run tests
paultuckey May 11, 2022
278ff51
Stick with pom
paultuckey May 11, 2022
d3fa2a8
fix javadoc
paultuckey Jun 6, 2022
44c8642
build all branches
paultuckey Dec 13, 2022
ac13c4a
upgrade meven plugins
paultuckey Mar 2, 2023
3f1e0ad
upgrade maven plugins
paultuckey Mar 2, 2023
34a1924
upgrade maven plugins
paultuckey Mar 2, 2023
733ff51
upgrade maven plugins
paultuckey Mar 21, 2023
94eb7a5
upgrade maven plugins
paultuckey Mar 21, 2023
11915a0
upgrade maven plugins
paultuckey Mar 21, 2023
2efb29e
upgrade maven plugins
paultuckey Mar 21, 2023
2ef5876
upgrade maven plugins
paultuckey Mar 21, 2023
21f6029
upgrade maven plugins
paultuckey Mar 21, 2023
853fa9d
isFile handles encoded URIs
bdw429s Apr 4, 2023
192e18f
Add support for 307 Temprorary & 308 Permanent redirect
Jun 27, 2023
32fb229
Bump ant from 1.7.0 to 1.10.11
dependabot[bot] Jul 2, 2023
ebe4fac
progress
paultuckey Jul 2, 2023
b1cdaa1
progress
paultuckey Jul 2, 2023
dbb0525
progress
paultuckey Jul 12, 2023
9eef1a4
progress
paultuckey Jul 12, 2023
d7ebacf
progress
paultuckey Jul 16, 2023
ab81123
progress
paultuckey Jul 16, 2023
13a64af
config for upload to sonatype
paultuckey Sep 3, 2023
5046fcf
add sources and javadoc to release
paultuckey Oct 17, 2023
8349888
add release
paultuckey Oct 18, 2023
53bc4bf
add utf8 source encoding
paultuckey Oct 19, 2023
e231085
skip gpg
paultuckey Oct 19, 2023
72475d9
notes
paultuckey Oct 19, 2023
245b6a8
Remove jetbrains link
paultuckey Oct 19, 2023
d7c133c
Add note to check maven central
paultuckey Oct 19, 2023
b810945
remove unused annotation processor
paultuckey Oct 19, 2023
7d54563
chore: tidy up
paultuckey Oct 19, 2023
e448aca
Ensure compatibility with 4.x servlet API
chadlwilson Nov 4, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# These are supported funding model platforms

github: paultuckey # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
33 changes: 33 additions & 0 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# This workflow will build a Java project with Maven
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven

name: Java CI with Maven

on:
push:
workflow_dispatch:

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'zulu'

- name: Build with Maven
run: mvn --batch-mode --update-snapshots package

- name: Locally install filter
run: mvn install --batch-mode -Dgpg.skip

# - uses: actions/upload-artifact@v3
# with:
# name: Package
# path: staging
48 changes: 48 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Publish package to the Maven Central Repository and GitHub Packages
on:
workflow_dispatch
jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v3

# Do manually for now (Sep 2023)
# https://central.sonatype.org/publish/publish-maven/#nexus-staging-maven-plugin-for-deployment-and-release
# brew uninstall gpg2
# brew install gnupg
# which gpg
# sudo ln -s /opt/homebrew/bin/gpg /usr/local/bin/gpg2
# gpg --gen-key --default-new-key-algo=rsa4096/cert,sign+rsa4096/encr
# gpg --list-keys
# gpg --keyserver hkp://keys.openpgp.org --send-keys 01F9EF136A63C2E2BFE561AC5001F66EF9179A2C
#
# mvn clean deploy
# tag and push `urlrewritefilter-x.x.x`
# check https://repo1.maven.org/maven2/org/tuckey/urlrewritefilter/

# - name: Set up Java for publishing to Maven Central Repository
# uses: actions/setup-java@v3
# with:
# java-version: '11'
# distribution: 'adopt'
# server-id: ossrh
# server-username: MAVEN_USERNAME
# server-password: MAVEN_PASSWORD
# - name: Publish to the Maven Central Repository
# run: mvn --batch-mode deploy
# env:
# MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
# MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
# - name: Set up Java for publishing to GitHub Packages
# uses: actions/setup-java@v3
# with:
# java-version: '8'
# distribution: 'zulu'
# - name: Publish to GitHub Packages
# run: mvn --batch-mode deploy
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,6 @@
# Maven
log/
target/
/.gradle/
/bin/
/build/
14 changes: 6 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@

# UrlRewriteFilter

### [UrlRewriteFilter Web Site](http://www.tuckey.org/urlrewrite/) | [Documentation](http://cdn.rawgit.com/paultuckey/urlrewritefilter/master/src/doc/manual/4.0/index.html)
### [UrlRewriteFilter Web Site](http://www.tuckey.org/urlrewrite/) | [Documentation](https://tuckey.org/urlrewrite/manual/4.0/index.html)


*Based on the popular and very useful [mod_rewrite](http://httpd.apache.org/docs-2.0/mod/mod_rewrite.html) for apache, UrlRewriteFilter is a Java Web Filter for any J2EE compliant web application server (such as [Resin](http://caucho.com), [Orion](http://www.orionserver.com/) or [Tomcat](http://tomcat.apache.org/)), 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 with Apache Web Server (see [mod_rewrite's rewriting guide](http://httpd.apache.org/docs-2.0/misc/rewriteguide.html)) but has not been possible in most java web application servers. The main things it is used for are:

* URL Tidyness / [URL Abstraction](http://cdn.rawgit.com/paultuckey/urlrewritefilter/master/src/doc/manual/4.0/guide.html#urlabs) - keep URLs tidy irrespective of the underlying technology or framework (JSP, Servlet, Struts etc).
* URL Tidyness / [URL Abstraction](https://tuckey.org/urlrewrite/manual/4.0/guide.html#urlabs) - 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.
* Tiny/Friendly URL's (i.e. blah.com/latest can be redirected to blah.com/download/ver1.2.46.2/setup.exe)
* A Servlet mapping engine (see [Method Invocation](http://cdn.rawgit.com/paultuckey/urlrewritefilter/master/src/doc/manual/4.0/guide.html#method))
* A Servlet mapping engine (see [Method Invocation](https://tuckey.org/urlrewrite/manual/4.0/guide.html#method))


!UrlRewriteFilter uses an xml file, called urlrewrite.xml (it goes into the WEB-INF directory), for configuration. Most parameters can be Perl5 style Regular Expressions or Wildcard Expressions. This makes it very powerful indeed.

See the [manual](http://cdn.rawgit.com/paultuckey/urlrewritefilter/master/src/doc/manual/4.0/index.html) for more information.
See the [manual](https://tuckey.org/urlrewrite/manual/4.0/index.html) for more information.


## Quick Start
Expand All @@ -31,7 +31,7 @@ See the [manual](http://cdn.rawgit.com/paultuckey/urlrewritefilter/master/src/do
<version>4.0.3</version>
</dependency>
```
* Add the following to your WEB-INF/web.xml (add it near the top above your servlet mappings (if you have any)): (see <a href="http://cdn.rawgit.com/paultuckey/urlrewritefilter/master/src/doc/manual/4.0/index.html#filterparams">filter parameters</a> for more options)
* Add the following to your WEB-INF/web.xml (add it near the top above your servlet mappings (if you have any)): (see <a href="https://tuckey.org/urlrewrite/manual/4.0/index.html#filterparams">filter parameters</a> for more options)
```xml
<filter>
<filter-name>UrlRewriteFilter</filter-name>
Expand All @@ -44,11 +44,9 @@ See the [manual](http://cdn.rawgit.com/paultuckey/urlrewritefilter/master/src/do
<dispatcher>FORWARD</dispatcher>
</filter-mapping>
```
* Add <b><a href="http://cdn.rawgit.com/paultuckey/urlrewritefilter/master/src/doc/manual/4.0/urlrewrite.xml">urlrewrite.xml</a></b> into your WEB-INF directory. (src/main/webapp/WEB-INF/ for Maven users)
* Add <b><a href="https://tuckey.org/urlrewrite/manual/4.0/urlrewrite.xml">urlrewrite.xml</a></b> into your WEB-INF directory. (src/main/webapp/WEB-INF/ for Maven users)
* Restart the context.

You can visit http://127.0.0.1:8080/rewrite-status (or whatever the address of your local webapp and context) to see output (note: this page is only viewable from localhost).

<a href="http://www.jetbrains.com/idea/"><img src="http://www.jetbrains.com/img/logo_bw.gif" alt="The best Java IDE" border="0"/></a> IDE Sponsored by [JetBrains](http://www.jetbrains.com/)

Previously on Google Code: http://code.google.com/p/urlrewritefilter.
54 changes: 0 additions & 54 deletions annotation/build.xml

This file was deleted.

90 changes: 0 additions & 90 deletions annotation/pom.xml

This file was deleted.

This file was deleted.

Loading