shiro-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "liyunfang (JIRA)" <j...@apache.org>
Subject [jira] [Created] (SHIRO-524) When I put the project packed into war, deployed to the tomcat7 cannot get the user.
Date Wed, 14 Jan 2015 02:03:34 GMT
liyunfang created SHIRO-524:
-------------------------------

             Summary: When I put the project packed into war, deployed to the tomcat7 cannot
get the user.
                 Key: SHIRO-524
                 URL: https://issues.apache.org/jira/browse/SHIRO-524
             Project: Shiro
          Issue Type: Question
          Components: Session Management
    Affects Versions: 1.2.1
         Environment: apache-tomcat-7.0.57
            Reporter: liyunfang


When I put the project into the .war package and deplyoed to tomcat,i cannot get the user
by SecurityUtils.getSubject().getPrincipal().that don't have any error.

there are my session config:

<!-- 会话DAO -->
	<bean id="sessionDAO"
		class="org.apache.shiro.session.mgt.eis.EnterpriseCacheSessionDAO">
		<property name="activeSessionsCacheName" value="shiro-activeSessionCache" />
		<property name="sessionIdGenerator" ref="sessionIDGenerator" />
	</bean>

	<!-- 会话验证调度器 -->
	<bean id="sessionValidationScheduler"
		class="com.cz073586.security.session.QuartzSessionValidationSchedulerEx">
		<property name="sessionValidationInterval" value="1800000" />
		<property name="sessionManager" ref="sessionManager" />
	</bean>

	<!-- session管理 -->
	<bean id="sessionManager"
		class="org.apache.shiro.web.session.mgt.DefaultWebSessionManager">
		<!-- # 3,600,000 milliseconds = 1 hour -->
		<property name="globalSessionTimeout" value="7200000" />
		<property name="sessionIdCookieEnabled" value="true" />
<!-- 		<property name="sessionIdCookie" ref="sessionIdCookie" /> -->

		<property name="sessionValidationSchedulerEnabled" value="true" />
		<property name="sessionValidationScheduler" ref="sessionValidationScheduler" />
		<property name="sessionDAO" ref="sessionDAO" />
	</bean>





--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message