You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@shiro.apache.org by xiemeilong <xi...@gmail.com> on 2013/11/28 09:45:29 UTC

WebEnvironment is not seted when using with spring?

I am using shiro, Atmosphere and spring . but the last line of code will
failed
 Subject currentUser = null;
                if (r.transport().equals(TRANSPORT.WEBSOCKET)) {
                    WebEnvironment env =
WebUtils.getRequiredWebEnvironment(r.getAtmosphereConfig().getServletContext());

I know i need config this if I am not using spring.
 <listener>
    
<listener-class>org.apache.shiro.web.env.EnvironmentLoaderListener</listener-class>
 </listener>

but what should i do that when I am using spring?


sorry for my poor english...



--
View this message in context: http://shiro-user.582556.n2.nabble.com/WebEnvironment-is-not-seted-when-using-with-spring-tp7579424.html
Sent from the Shiro User mailing list archive at Nabble.com.

Re: WebEnvironment is not seted when using with spring?

Posted by Jared Bunting <ja...@peachjean.com>.
I don't know anything about atmosphere, but do you have ShiroFilter setup?
On Nov 28, 2013 3:46 AM, "xiemeilong" <xi...@gmail.com> wrote:

> I am using shiro, Atmosphere and spring . but the last line of code will
> failed
>  Subject currentUser = null;
>                 if (r.transport().equals(TRANSPORT.WEBSOCKET)) {
>                     WebEnvironment env =
>
> WebUtils.getRequiredWebEnvironment(r.getAtmosphereConfig().getServletContext());
>
> I know i need config this if I am not using spring.
>  <listener>
>
>
> <listener-class>org.apache.shiro.web.env.EnvironmentLoaderListener</listener-class>
>  </listener>
>
> but what should i do that when I am using spring?
>
>
> sorry for my poor english...
>
>
>
> --
> View this message in context:
> http://shiro-user.582556.n2.nabble.com/WebEnvironment-is-not-seted-when-using-with-spring-tp7579424.html
> Sent from the Shiro User mailing list archive at Nabble.com.
>