Cleanup before 1.1 release
This commit is contained in:
parent
3bedb10705
commit
7b3e4adfc8
15 changed files with 61 additions and 66 deletions
33
README.md
33
README.md
|
@ -1,17 +1,17 @@
|
|||
# HttpStatus JSP Tag Library
|
||||
# HttpStatus JSP Tag Library
|
||||
|
||||
[](http://opensource.org/licenses/BSD-3-Clause)
|
||||
[](https://www.oracle.com/java/technologies/javase/jdk17-archive-downloads.html)
|
||||
[](https://rife2.com/bld)
|
||||
[](https://github.com/ethauvin/httpstatus/releases/latest)
|
||||
[](https://search.maven.org/search?q=g:%22net.thauvin.erik.httpstatus%22%20AND%20a:%22httpstatus%22)
|
||||
[](https://oss.sonatype.org/content/repositories/snapshots/net/thauvin/erik/httpstatus/httpstatus/)
|
||||
[](https://oss.sonatype.org/content/repositories/snapshots/net/thauvin/erik/httpstatus/httpstatus/)
|
||||
[](https://central.sonatype.com/artifact/net.thauvin.erik.httpstatus/httpstatus)
|
||||
|
||||
[](https://snyk.io/test/github/ethauvin/httpstatus?targetFile=pom.xml)
|
||||
[](https://sonarcloud.io/summary/new_code?id=ethauvin_HttpStatus)
|
||||
[](https://github.com/ethauvin/httpstatus/actions/workflows/bld.yml)
|
||||
[](https://circleci.com/gh/ethauvin/HttpStatus/tree/master)
|
||||
|
||||
|
||||
A simple [JSP](http://www.oracle.com/technetwork/java/javaee/jsp/index.html) Tag Library to display the [code](#hscode), [reason](#hsreason), [cause](#hscode) and/or [message](#hsmessage) for [HTTP status codes](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html) in JSP error pages.
|
||||
|
||||
For example:
|
||||
|
@ -35,11 +35,14 @@ or
|
|||
<%= Reasons.getReasonPhrase(pageContext.getErrorData().getStatusCode()) %>
|
||||
```
|
||||
|
||||
would display on a [501 status code](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.2):
|
||||
would display on a [501 status code](https://www.rfc-editor.org/rfc/rfc9110.html#name-501-not-implemented):
|
||||
|
||||
Not Implemented
|
||||
```plain
|
||||
Not Implemented
|
||||
```
|
||||
|
||||
## Usage with [Gradle](https://gradle.org/), [Maven](http://maven.apache.org/) or [bld](https://rife2.com/bld)
|
||||
|
||||
## Usage with [Gradle](https://gradle.org/) or [Maven](http://maven.apache.org/)
|
||||
Include the following in your `build.gradle` file:
|
||||
|
||||
```gradle
|
||||
|
@ -48,20 +51,28 @@ repositories {
|
|||
}
|
||||
|
||||
dependencies {
|
||||
implementation 'net.thauvin.erik.httpstatus:httpstatus:1.0.5'
|
||||
implementation 'net.thauvin.erik.httpstatus:httpstatus:1.1.0'
|
||||
}
|
||||
```
|
||||
|
||||
or as a Maven artifact:
|
||||
or as a `Maven` artifact:
|
||||
|
||||
```xml
|
||||
<dependency>
|
||||
<groupId>net.thauvin.erik.httpstatus</groupId>
|
||||
<artifactId>httpstatus</artifactId>
|
||||
<version>1.0.5</version>
|
||||
<version>1.1.0</version>
|
||||
</dependency>
|
||||
```
|
||||
|
||||
or in a `bld` build file:
|
||||
|
||||
```java
|
||||
scope(compile).include(
|
||||
dependency("net.thauvin.erik.httpstatus","httpstatus", version(1, 1, 0))
|
||||
);
|
||||
```
|
||||
|
||||
## hs:cause
|
||||
|
||||
The `<hs:cause/>` tag displays the cause of current HTTP status code, if any. A shorthand for:
|
||||
|
@ -78,6 +89,7 @@ Optional attributes are:
|
|||
| `escapeXml` | Converts <, >, &, ', " to their corresponding [entity codes](http://dev.w3.org/html5/html-author/charref). Value is `true` by default. |
|
||||
|
||||
## hs:code
|
||||
|
||||
The `<hs:code/>` tag displays the current HTTP status code, if any. A shorthand for:
|
||||
|
||||
```jsp
|
||||
|
@ -261,6 +273,7 @@ The reasons are defined in a [ResourceBundle](https://docs.oracle.com/en/java/ja
|
|||
| `599` | Network Connect Timeout Error |
|
||||
|
||||
## Command Line Usage
|
||||
|
||||
You can query the reason phrase for status codes as follows:
|
||||
|
||||
```sh
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue