diff --git a/README.md b/README.md
index 7a8d7ce..60755aa 100644
--- a/README.md
+++ b/README.md
@@ -11,7 +11,7 @@ A simple Kotlin/Java implementation of [Medium's Read Time calculation](https://
```kotlin
import net.thauvin.erik.readingtime.ReadingTime
-...
+// ...
val rt = ReadingTime(htmlText)
println(rt.calcEstimatedReadTime()) // eg: 2 min read
@@ -56,6 +56,19 @@ ReadingTime.wordCount(htmlText) // Returns the count of words. (HTML stripped)
ReadingTime.imgCount(htmlText) // Returns the count of images. (HTML img tags)
```
+### JSP
+
+A JSP tag is also available for easy incorporation into web applications:
+
+```jsp
+<%@taglib uri="https://erik.thauvin.net/taglibs/readingtime" prefix="t"%>
+some_text
+```
+
+None of the attributes are required.
+
+Just drop the jar into your `WEB-INF/lib` directory.
+
### Gradle
To use with [Gradle](https://gradle.org/), include the following dependency in your [build](https://github.com/ethauvin/readingtime/blob/master/examples/build.gradle.kts) file:
diff --git a/src/main/resources/META-INF/readingtime.tld b/src/main/resources/META-INF/readingtime.tld
new file mode 100644
index 0000000..17e3a09
--- /dev/null
+++ b/src/main/resources/META-INF/readingtime.tld
@@ -0,0 +1,13 @@
+
+
+ 1.0
+ ReadingTime
+ https://erik.thauvin.net/taglibs/readingtime
+
+ readingtime
+ /META-INF/tags/readingtime.tag
+
+
diff --git a/src/main/resources/META-INF/tags/readingtime.tag b/src/main/resources/META-INF/tags/readingtime.tag
new file mode 100644
index 0000000..a2f8f54
--- /dev/null
+++ b/src/main/resources/META-INF/tags/readingtime.tag
@@ -0,0 +1,37 @@
+<%--
+ Copyright (c) 2020, Erik C. Thauvin (erik@thauvin.net)
+ All rights reserved.
+
+ See https://opensource.org/licenses/BSD-3-Clause
+--%>
+<%@tag body-content="scriptless" import="net.thauvin.erik.readingtime.ReadingTime" trimDirectiveWhitespaces="true"%>
+<%@attribute name="debug" type="java.lang.Boolean"%>
+<%@attribute name="excludeImages" type="java.lang.Boolean"%>
+<%@attribute name="plural"%>
+<%@attribute name="postfix"%>
+<%@attribute name="wpm" type="java.lang.Integer"%>
+
+<%
+ final Boolean debug = (Boolean) getJspContext().getAttribute("debug");
+ final Boolean excludeImages = (Boolean) getJspContext().getAttribute("excludeImages");
+ final Integer wpm = (Integer) getJspContext().getAttribute("wpm");
+ final String body = (String) getJspContext().getAttribute("body");;
+ final String plural = (String) getJspContext().getAttribute("plural");
+ final String postfix = (String) getJspContext().getAttribute("postfix");
+
+ if (body != null) {
+ final ReadingTime rt = new ReadingTime(body);
+ if (excludeImages != null) rt.setExcludeImages(excludeImages);
+ if (plural != null) rt.setPlural(plural);
+ if (postfix != null) rt.setPostfix(postfix);
+ if (wpm != null) rt.setWpm(wpm);
+ out.write(rt.calcReadingTime());
+ if (debug != null && debug) {
+ out.write("");
+ }
+ }
+%>