Can we see the relevant parts of your web.xml and Spring xml configuration? Its hard to say without it...
On Wed, Feb 4, 2009 at 12:07 PM, jvreeker <[email protected]> wrote: > > Hi Les, > > So I build in the JSecurityFilter, but If I use > SecurityUtils.getSubject().getSession() I still get different sessions. I > am > need the same session, because if I am logged in I use the function > setAttribute. > TRACE org.jsecurity.session.mgt.DefaultSessionManager - Creating session > for originating host [/192.168.0.37] > > Why is it still creating new sessions.? > > Jelle > > > Les Hazlewood-2 wrote: > > > > Hi Jelle, > > > > The appropriate set-up for a web-enabled application is to use the > > JSecurityFilter in web.xml. It will set up a DefaultWebSecurityManager > > and > > do Request binding automatically: > > > > > http://www.jsecurity.org/api/org/jsecurity/web/servlet/JSecurityFilter.html > > > > After the filter is defined, just do this anywhere in code: > > > > SecurityUtils.getSubject(); > > > > You shouldn't interact with the SecurityManager directly unless you're > > programming infrastructure/framework code. > > > > Check out the sample web application in the jsecurity distribution and > > look > > at its web.xml file and applicationContext.xml file. It shows you how to > > configure Realms and other things in Spring which will then be accessible > > to > > the JSecurityFilter at runtime. > > > > Cheers, > > > > Les > > > > On Tue, Feb 3, 2009 at 12:17 PM, jvreeker <[email protected]> wrote: > > > >> > >> Hi, > >> > >> I have a tomcat server, with spring using cxf to enable the soap calls. > >> > >> So I have a soap call login. when I call securityManager.getSubject() I > >> get > >> always the same subject back. > >> I though it was because I am using > >> org.jsecurity.mgt.DefaultSecurityManager. > >> > >> So I tried DefaultWebSecurityManager but then I am getting errors. > >> No ServletRequest found in ThreadContext. Make sure WebUtils.bind() is > >> being > >> called. > >> > >> But in the first option if I use getSubject().GetSession it returns > >> different sessions. > >> should I then use SessionManager and the correct sessionID. > >> > >> Is this the correct way? > >> Thanks, > >> Jelle > >> -- > >> View this message in context: > >> http://n2.nabble.com/using-CXF-with-JSecurity-tp2264471p2264471.html > >> Sent from the JSecurity User mailing list archive at Nabble.com. > >> > >> > > > > > > -- > View this message in context: > http://n2.nabble.com/using-CXF-with-JSecurity-tp2264471p2270012.html > Sent from the JSecurity User mailing list archive at Nabble.com. > >
