You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@shiro.apache.org by edcincy <ed...@yahoo.com> on 2012/12/29 20:09:56 UTC

Shiro JSP tags not working on app engine

My Java project runs locally using Jetty.  I have made no settings in Jetty
to get Shiro to work.

When testing locally, everything works fine.  The JSP tags recognize an
*authenticated*/*not authenticated* user and show or hide the JSP content as
expected.

When deployed to GAE, the Shiro tags checking for authentication
(*<shiro:authenticated>*) don't work.

Is there a setting I'm missing to allow this to work on GAE?

Thanks!



--
View this message in context: http://shiro-user.582556.n2.nabble.com/Shiro-JSP-tags-not-working-on-app-engine-tp7578096.html
Sent from the Shiro User mailing list archive at Nabble.com.

Re: Shiro JSP tags not working on app engine

Posted by Les Hazlewood <lh...@apache.org>.
These little issues plague all developers from time to time.  I'm glad you
found the solution!

Cheers,

--
Les Hazlewood | @lhazlewood
CTO, Stormpath | http://stormpath.com | @goStormpath | 888.391.5282
Stormpath wins GigaOM Structure Launchpad Award! http://bit.ly/MvZkMk

On Sun, Dec 30, 2012 at 11:54 AM, edcincy <ed...@yahoo.com> wrote:

>
> Ok, let me just chalk this up to me being an idiot.
>
> The user was not authenticating.  Thus (as mentioned above) the user wasn't
> in the session.
>
> Thus... the JSP tags didn't work!   Imagine that.
>
>
>
> --
> View this message in context:
> http://shiro-user.582556.n2.nabble.com/Shiro-JSP-tags-not-working-on-app-engine-tp7578096p7578100.html
> Sent from the Shiro User mailing list archive at Nabble.com.
>

Re: Shiro JSP tags not working on app engine

Posted by edcincy <ed...@yahoo.com>.
Ok, let me just chalk this up to me being an idiot.

The user was not authenticating.  Thus (as mentioned above) the user wasn't
in the session.

Thus... the JSP tags didn't work!   Imagine that.



--
View this message in context: http://shiro-user.582556.n2.nabble.com/Shiro-JSP-tags-not-working-on-app-engine-tp7578096p7578100.html
Sent from the Shiro User mailing list archive at Nabble.com.

Re: Shiro JSP tags not working on app engine

Posted by edcincy <ed...@yahoo.com>.
Going back and looking over my code, I thought I made a mistake.

I added the line...

sessionManager = org.apache.shiro.web.session.mgt.DefaultWebSessionManager
securityManager.sessionManager = $sessionManager

To my "shire.ini" file, but that just made things worse.

I get an "Error 500" when this line is added.

I'll keep checking.



--
View this message in context: http://shiro-user.582556.n2.nabble.com/Shiro-JSP-tags-not-working-on-app-engine-tp7578096p7578099.html
Sent from the Shiro User mailing list archive at Nabble.com.

Re: Shiro JSP tags not working on app engine

Posted by Les Hazlewood <lh...@apache.org>.
Hello,

It should work fine (to the best of my knowledge).  Does this sample
app use them?

https://gaeshiro.appspot.com/

If they don't work, the first thing I'd look for is to see if
SecurityUtils.getSubject().<whatever> works since that's pretty much
what the JSP tags delegate to.  I'm unaware of how GAE may allow or
disallow ThreadLocals, but I *thought* they worked.

HTH,

Les

On Sat, Dec 29, 2012 at 11:09 AM, edcincy <ed...@yahoo.com> wrote:
> My Java project runs locally using Jetty.  I have made no settings in Jetty
> to get Shiro to work.
>
> When testing locally, everything works fine.  The JSP tags recognize an
> *authenticated*/*not authenticated* user and show or hide the JSP content as
> expected.
>
> When deployed to GAE, the Shiro tags checking for authentication
> (*<shiro:authenticated>*) don't work.
>
> Is there a setting I'm missing to allow this to work on GAE?
>
> Thanks!
>
>
>
> --
> View this message in context: http://shiro-user.582556.n2.nabble.com/Shiro-JSP-tags-not-working-on-app-engine-tp7578096.html
> Sent from the Shiro User mailing list archive at Nabble.com.