Well, I think it was because I don't know that I could do that :)
Could you please, point me to any place showing how could I do that?
thanks
Cristiano
On 19/01/12 17:32, [email protected] wrote:
Why can't you just initialize the Environment manually in your bundle
activator?
On Thu, Jan 19, 2012 at 3:23 PM, Cristiano Gavião - [email protected]
<mailto:[email protected]> wrote:
Answering myself for the records...
Yes, you can use shiro 1.2 with any OSGi environment that uses the
org.osgi.service.http, with each container specific extended(Felix
and Equinox has one), but ONLY if you use the deprecated Filter
org.apache.shiro.web.servlet.IniShiroFilter
If you try to use the new recomended filter
org.apache.shiro.web.servlet.ShiroFilter you will receive this error:
ERROR org.eclipse.equinox.cm <http://org.eclipse.equinox.cm> -
javax.servlet.ServletException: java.lang.IllegalStateException:
No WebEnvironment found: no EnvironmentLoaderListener registered?
java.lang.RuntimeException: javax.servlet.ServletException:
java.lang.IllegalStateException: No WebEnvironment found: no
EnvironmentLoaderListener registered?
To use IniShiroFilter you MUST create a Bundle-Fragment and
include the shiro.ini inside it and export it.
regards
On 18/01/12 13:55, Cristiano Gavião wrote:
Hi,
I have one web application that is running inside a equinox osgi
container and it don't use web.xml.
Now I'm trying to figure out how could I use Shiro in such
environment.
I already could figure out how to setup the Filter using equinox
ExtendedHttpService. But I couldn't find in Equinox a defined API
to register listeners.
So, would be possible to use Shiro without registering the
org.apache.shiro.web.env.EnvironmentLoaderListener ?
thanks for any tip.
regards,
Cristiano