I have a working set of shiro tags like so in one of my login pages,
which presents login form or logged in message.
This works fine:
<shiro:guest>
<form name="loginForm" action="" method="post" align="right">
You are not currently logged in
<BR/><BR/>
Username:<input type="text" name="username"
maxlength="30" style="width:100px;height:12px">
Password:<input type="password" name="password"
maxlength="30" style="width:100px;height:12px">
<input type="submit" name="submit" value="Login">
</form>
</shiro:guest>
<shiro:authenticated>
<div align="right">
You are logged in as <B><shiro:principal/></B>.
Click <a href="logout.jsp">here</a> to logout.
</div>
</shiro:authenticated>
Shiro security is enabled or disabled at server start and I had to do a
workaround to completely hide this section althogether. In otherwords,
if shiro filter was never added, redirect to another page instead of
this one.
It seems as though there might be an easier way to do this via this same
JSP page. In other words, something like wrapping those entire secitions
with some sort of "is shiro filter enabled at all" type of tag or something.
Suggestions?