That sounds like a reasonable enough approach to me.  I think it could
work well for your particular use case. For example create a
<shiro:enabled> tag...

Cheers,

Les

On Wed, Feb 8, 2012 at 11:04 PM, Chris Richmond
<[email protected]> wrote:
> 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">
> &nbsp;
>                     Password:<input type="password" name="password"
> maxlength="30" style="width:100px;height:12px">
> &nbsp;
> <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?

Reply via email to