Slugify - JSTL Integration

SEO-friendly URLs with Slugify

License

License

Categories

Categories

Jakarta Standard Tag Library Jakarta EE The Web Tier
GroupId

GroupId

com.github.slugify
ArtifactId

ArtifactId

slugify-integration-jstl
Last Version

Last Version

2.5
Release Date

Release Date

Type

Type

jar
Description

Description

Slugify - JSTL Integration
SEO-friendly URLs with Slugify

Download slugify-integration-jstl

How to add to project

<!-- https://jarcasting.com/artifacts/com.github.slugify/slugify-integration-jstl/ -->
<dependency>
    <groupId>com.github.slugify</groupId>
    <artifactId>slugify-integration-jstl</artifactId>
    <version>2.5</version>
</dependency>
// https://jarcasting.com/artifacts/com.github.slugify/slugify-integration-jstl/
implementation 'com.github.slugify:slugify-integration-jstl:2.5'
// https://jarcasting.com/artifacts/com.github.slugify/slugify-integration-jstl/
implementation ("com.github.slugify:slugify-integration-jstl:2.5")
'com.github.slugify:slugify-integration-jstl:jar:2.5'
<dependency org="com.github.slugify" name="slugify-integration-jstl" rev="2.5">
  <artifact name="slugify-integration-jstl" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.github.slugify', module='slugify-integration-jstl', version='2.5')
)
libraryDependencies += "com.github.slugify" % "slugify-integration-jstl" % "2.5"
[com.github.slugify/slugify-integration-jstl "2.5"]

Dependencies

compile (1)

Group / Artifact Type Version
com.github.slugify : slugify jar 2.5

provided (2)

Group / Artifact Type Version
javax.servlet.jsp : jsp-api jar 2.1
javax.servlet : jstl jar 1.2

test (1)

Group / Artifact Type Version
junit : junit jar 4.12

Project Modules

There are no modules declared in this project.

Slugify Build Status

SEO-friendly URLs with Slugify

Notice

If you want to use it directly in your JSP, take a look into jstl

Usage

If you want to use Slugify in your Java code you only need the library itself. Here's the dependency information for Maven:

<dependency>
	<groupId>com.github.slugify</groupId>
	<artifactId>slugify</artifactId>
	<version>2.4</version>
</dependency>

Now you're able to use it:

Slugify slg = new Slugify();
String result = slg.slugify("Hello, world!");
// result: hello-world

You can set custom replacements for Slugify:

Slugify slg = slg.withCustomReplacement("hello", "world").withCustomReplacement("foo", "bar");
// or multiple at once
slg = slg.withCustomReplacements(new HashMap<String, String>() {{
	put("hello", "world");
	put("foo", "bar");
}});

String result = slg.slugify("hello foo");
// result: world-bar

Or if you want case sensitivity:

Slugify slg = new Slugify().withLowerCase(false);
String result = slg.slugify("Hello, World!");
// result: Hello-World

Versions

Version
2.5
2.4
2.3
2.2
2.1.12
2.1.11
2.1.10
2.1.9
2.1.8
2.1.7
2.1.6
2.1.5
2.1.4
2.1.3
2.1.2
2.1.0
2.0.2
2.0.1-RELEASE
2.0.0