net.mingsoft:shiro-freemarker-tags

shiro-freemarker-tags

License

License

Categories

Categories

Net
GroupId

GroupId

net.mingsoft
ArtifactId

ArtifactId

shiro-freemarker-tags
Last Version

Last Version

1.0.2
Release Date

Release Date

Type

Type

jar
Description

Description

net.mingsoft:shiro-freemarker-tags
shiro-freemarker-tags
Project URL

Project URL

https://github.com/jagregory/shiro-freemarker-tags
Source Code Management

Source Code Management

https://github.com/jagregory/shiro-freemarker-tags

Download shiro-freemarker-tags

How to add to project

<!-- https://jarcasting.com/artifacts/net.mingsoft/shiro-freemarker-tags/ -->
<dependency>
    <groupId>net.mingsoft</groupId>
    <artifactId>shiro-freemarker-tags</artifactId>
    <version>1.0.2</version>
</dependency>
// https://jarcasting.com/artifacts/net.mingsoft/shiro-freemarker-tags/
implementation 'net.mingsoft:shiro-freemarker-tags:1.0.2'
// https://jarcasting.com/artifacts/net.mingsoft/shiro-freemarker-tags/
implementation ("net.mingsoft:shiro-freemarker-tags:1.0.2")
'net.mingsoft:shiro-freemarker-tags:jar:1.0.2'
<dependency org="net.mingsoft" name="shiro-freemarker-tags" rev="1.0.2">
  <artifact name="shiro-freemarker-tags" type="jar" />
</dependency>
@Grapes(
@Grab(group='net.mingsoft', module='shiro-freemarker-tags', version='1.0.2')
)
libraryDependencies += "net.mingsoft" % "shiro-freemarker-tags" % "1.0.2"
[net.mingsoft/shiro-freemarker-tags "1.0.2"]

Dependencies

compile (2)

Group / Artifact Type Version
org.freemarker : freemarker jar 2.3.20
org.apache.shiro : shiro-all jar 1.5.3

Project Modules

There are no modules declared in this project.

Apache Shiro tags for Freemarker

Apache Shiro comes with some handy JSP tags for doing things like only showing content for anonymous users, logged in users, etc... I'm using Freemarker and didn't want to take a dependency on JSP just for Shiro, so I rewrote the tags for Freemarker.

Install

Either download the dist/shiro-freemarker-tags-0.1-SNAPSHOT.jar or take all the java files and stick them in your project. Simple.

If there's enough demand, I could put this up on Maven.

Usage

Declare a shared variable called "shiro", and assign it to an instance of the ShiroTags class.

cfg.setSharedVariable("shiro", new ShiroTags());

You should then be able to use the tags in your Freemarker templates.

<@shiro.guest>Hello guest!</@shiro.guest>

License

Do what you want with it, just don't blame me if it breaks anything.

Versions

Version
1.0.2
1.0.1
1.0.0
0.1