Thanks for your offer of help Brad and sorry these files are so big.

I do have a habit of editing my posts occassionally through Nabble so maybe
that is causing me to post twice?

Currently a lack of skill prevents me from setting a break point on the
SpringObjectFactory.buildBean() but that is somethig I can start looking
into tomorrow. It is somethig I know I should learn but never seem to find
the time to get around too.

I have posted the various files you mentioned below in case you have time to
look at them (I don't have a struts.properties):

======================
struts.xml

I have removed all actions except the one I am trying to get working with
spring. It is on the package at the top of the file in package
'authenticatedwithssl' The struts results doesn't seem to have come across
correctly in the formatting and is missing some nodes but it is valid in my
real struts.xml file and works correctly.
======================
<struts>

    <constant name="struts.i18n.reload" value="true" />
    <constant name="struts.devMode" value="true" />
    <constant name="struts.configuration.xml.reload" value="true" />
    <constant name="struts.ui.theme" value="css_xhtml" />
    <constant name="struts.objectFactory" value="spring" />
    <constant name="struts.action.extension" value="action" />
    
    <package name="authenticatedwithssl" extends="struts-default"
namespace="/authenticatedwithssl">
     
        <interceptors>
            <interceptor
class="uk.co.prodia.prosoc.struts2.interceptor.InterceptorAddUserToSession"
name="addUserToSession" />
            <interceptor-stack name="addUserToSessionStack">
                <interceptor-ref name="addUserToSession"/>
                <interceptor-ref name="defaultStack"/>
            </interceptor-stack>
        </interceptors>
        <default-interceptor-ref name="addUserToSessionStack"/>
     
        <action name="update-email!*"
class="springManagedProsocActionUpdateEmail" method="{1}">
            <result
name="input">/WEB-INF/page/user/authenticatedwithssl/update-email.jsp</result>
            <result name="error" type="redirectAction">
                error
                /unsecured
            </result>
            <result name="success" type="redirectAction">
                success
                /unsecured
            </result>
        </action>
        
    </package>

    <package name="root" extends="struts-default" namespace="/">
        
        <interceptors>
            <interceptor
class="uk.co.prodia.prosoc.struts2.interceptor.InterceptorAddUserToSession"
name="addUserToSession" />
            <interceptor-stack name="addUserToSessionStack">
                <interceptor-ref name="addUserToSession"/>
                <interceptor-ref name="defaultStack"/>
            </interceptor-stack>
        </interceptors>
        <default-interceptor-ref name="addUserToSessionStack"/>
        
    </package>

     <package name="unsecured-page" extends="struts-default"
namespace="/unsecured">
      
        <interceptors>
            <interceptor
class="uk.co.prodia.prosoc.struts2.interceptor.InterceptorAddUserToSession"
name="addUserToSession" />
            <interceptor-stack name="addUserToSessionStack">
                <interceptor-ref name="addUserToSession"/>
                <interceptor-ref name="defaultStack"/>
            </interceptor-stack>
        </interceptors>
        <default-interceptor-ref name="addUserToSessionStack"/>
        
    </package>

    <package name="sslsecured" extends="struts-default"
namespace="/sslsecured">
     
        <interceptors>
            <interceptor
class="uk.co.prodia.prosoc.struts2.interceptor.InterceptorAddUserToSession"
name="addUserToSession" />
            <interceptor-stack name="addUserToSessionStack">
                <interceptor-ref name="addUserToSession"/>
                <interceptor-ref name="defaultStack"/>
            </interceptor-stack>
        </interceptors>
        <default-interceptor-ref name="addUserToSessionStack"/>
        
    </package>

    <package name="authenticated" extends="struts-default"
namespace="/authenticated">
        
        <interceptors>
            <interceptor
class="uk.co.prodia.prosoc.struts2.interceptor.InterceptorAddUserToSession"
name="addUserToSession" />
            <interceptor-stack name="addUserToSessionStack">
                <interceptor-ref name="addUserToSession"/>
                <interceptor-ref name="defaultStack"/>
            </interceptor-stack>
        </interceptors>
        <default-interceptor-ref name="addUserToSessionStack"/>
        
    </package>

    <package name="test" extends="struts-default" namespace="/test">
    
        <interceptors>
            <interceptor
class="uk.co.prodia.prosoc.struts2.interceptor.InterceptorAddUserToSession"
name="addUserToSession" />
            <interceptor-stack name="addUserToSessionStack">
                <interceptor-ref name="addUserToSession"/>
                <interceptor-ref name="defaultStack"/>
            </interceptor-stack>
        </interceptors>
        <default-interceptor-ref name="addUserToSessionStack"/>
    
    </package>
    
</struts>


======================
spring-config

which is called prosoc-spring-beans.xml within my app.
======================

    <!-- 
    XA datasource for the prosoc root context
    -->
    <bean id="dataSourceProsoc"
class="com.atomikos.jdbc.AtomikosDataSourceBean" init-method="init"
destroy-method="close">
        <property
name="uniqueResourceName"><value>XADBMSProsoc</value></property>
        <property
name="xaDataSourceClassName"><value>com.mysql.jdbc.jdbc2.optional.MysqlXADataSource</value></property>
        <property name="xaProperties">
            <props>
                <prop key="databaseName">prosoc</prop>
                <prop key="serverName">localhost</prop>
                <prop key="port">3306</prop>
                <prop key="user">prosoc</prop>
                <prop key="password">prosoc-</prop>
                <prop key="url">jdbc:mysql://localhost:3306/prosoc</prop>
            </props>
        </property>
        <property name="minPoolSize"><value>1</value></property>
    </bean>
    
    <!-- 
    XA datasource for the prosocForum context
    -->
    <bean id="dataSourceProsocForum"
class="com.atomikos.jdbc.AtomikosDataSourceBean" init-method="init"
destroy-method="close">
        <property
name="uniqueResourceName"><value>XADBMSProsocForum</value></property>
        <property
name="xaDataSourceClassName"><value>com.mysql.jdbc.jdbc2.optional.MysqlXADataSource</value></property>
        <property name="xaProperties">
            <props>
                <prop key="databaseName">prosoc</prop>
                <prop key="serverName">localhost</prop>
                <prop key="port">3306</prop>
                <prop key="user">prosoc</prop>
                <prop key="password">prosoc-</prop>
                <prop
key="url">jdbc:mysql://localhost:3306/prosoc_forum</prop>
            </props>
        </property>
        <property name="minPoolSize"><value>1</value></property>
    </bean>
    
    <!-- 
    SessionFactory for the prosoc root context
    -->
    <bean id="sessionFactoryProsoc"
class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
       <property name="useTransactionAwareDataSource" value="true"/>
       <property name="dataSource"><ref bean="dataSourceProsoc"/></property>
       <property name="mappingResources">
           <list>
               <value>uk/co/prodia/prosoc/user/User.hbm.xml</value>
           </list>
       </property>
       <property name="hibernateProperties">
           <props>
               <prop
key="hibernate.dialect">org.hibernate.dialect.MySQLInnoDBDialect</prop>
               <prop key="hibernate.connection.isolation">3</prop>
               <prop
key="hibernate.current_session_context_class">jta</prop>
               <prop
key="hibernate.transaction.factory_class">org.hibernate.transaction.JTATransactionFactory</prop>
               <prop
key="hibernate.transaction.manager_lookup_class">com.atomikos.icatch.jta.hibernate3.TransactionManagerLookup</prop>
               <prop key="hibernate.show_sql">true</prop>
               <prop key="hibernate.hbm2ddl.auto">update</prop>
           </props>
       </property>
    </bean>
    
    <!-- 
    SessionFactory for the prosocForum context
    -->
    <bean id="sessionFactoryProsocForum"
class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
       <property name="useTransactionAwareDataSource" value="true"/>
       <property name="dataSource"><ref
bean="dataSourceProsocForum"/></property>
       <property name="mappingResources">
           <list>
              
<value>uk/co/prodia/prosoc/forum/mvnforum/MVNForumMember.hbm.xml</value>
           </list>
       </property>
       <property name="hibernateProperties">
           <props>
               <!-- If hibernate.dialect causes a problem switch it to
org.hibernate.dialect.MySQLDialect -->
               <prop
key="hibernate.dialect">org.hibernate.dialect.MySQLInnoDBDialect</prop>
               <prop key="hibernate.connection.isolation">3</prop>
               <prop
key="hibernate.current_session_context_class">jta</prop>
               <prop
key="hibernate.transaction.factory_class">org.hibernate.transaction.JTATransactionFactory</prop>
               <prop
key="hibernate.transaction.manager_lookup_class">com.atomikos.icatch.jta.hibernate3.TransactionManagerLookup</prop>
               <prop key="hibernate.show_sql">true</prop>
           </props>
       </property>
    </bean>
    
    <bean id="atomikosTransactionManager"
class="com.atomikos.icatch.jta.UserTransactionManager" init-method="init"
destroy-method="close">
        <property name="forceShutdown"><value>true</value></property>
        <property name="startupTransactionService" value="true"/>
    </bean>

    <bean id="atomikosUserTransaction"
class="com.atomikos.icatch.jta.UserTransactionImp">
        <property name="transactionTimeout"><value>300</value></property>
    </bean>

    <bean id="transactionManager"
class="org.springframework.transaction.jta.JtaTransactionManager">
        <property name="transactionManager"><ref
bean="atomikosTransactionManager"/></property>
        <property name="userTransaction"><ref
bean="atomikosUserTransaction"/></property>
    </bean>
    
    <bean id="hibernateTemplate"
class="org.springframework.orm.hibernate3.HibernateTemplate">
        <property name="sessionFactory"><ref
bean="sessionFactoryProsoc"/></property>
    </bean>

    <bean id="prosocUser"
class="uk.co.prodia.prosoc.persistence.hibernate.DAOUserImpl">
        <property name="sessionFactory" ref="sessionFactoryProsoc"/>
    </bean>

    <bean id="prosocForumUser"
class="uk.co.prodia.prosoc.forum.mvnforum.persistance.hibernate.DAOMVNForumMemberImpl">
        <property name="sessionFactory" ref="sessionFactoryProsocForum"/>
    </bean>
    
    <bean id="springManagedProsocActionUpdateEmail"
class="uk.co.prodia.prosoc.struts2.action.ActionUpdateEmail"
scope="prototype">
    </bean>
    
    <bean
class="org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor"/>
    
    <tx:annotation-driven transaction-manager="transactionManager"/>
    
</beans>


======================
applicationContext-security.xml
=====================

<beans xmlns="http://www.springframework.org/schema/beans";
    xmlns:sec="http://www.springframework.org/schema/security";
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
    xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
                        http://www.springframework.org/schema/security
http://www.springframework.org/schema/security/spring-security-2.0.1.xsd";>
                            
    <sec:global-method-security secured-annotations="enabled">
    </sec:global-method-security>
    
    <!--
    This element creates an instance of
org.springframework.security.util.FilterChainProxy
    -->
    <sec:http entry-point-ref="casProcessingFilterEntryPoint">
        <sec:intercept-url pattern="/unsecured/**" requires-channel="http"/>
        <sec:intercept-url pattern="/unsecured/login!returnToOriginalPage**"
access="ROLE_LOGIN" requires-channel="http"/>
        <sec:intercept-url pattern="/sslsecured/**"
requires-channel="https"/>
        <sec:intercept-url pattern="/authenticated/**" access="ROLE_LOGIN"
requires-channel="http"/>
        <!--<sec:intercept-url pattern="/authenticatedwithssl/**"
access="ROLE_LOGIN" requires-channel="https"/>-->
        <sec:intercept-url pattern="/**.action" requires-channel="http"/>
    </sec:http>
    
    <!--
    Start CAS - Central Authentication Service (JASIG)
    -->
    <bean id="casProcessingFilterEntryPoint"
class="uk.co.prodia.prosoc.security.spring.cas.CasProcessingFilterEntryPoint">
        <property name="loginUrl"
value="https://localhost:8443/prosoc/cas/login"/>
        <property name="serviceProperties" ref="serviceProperties"/>
    </bean>
    <bean id="serviceProperties"
class="org.springframework.security.ui.cas.ServiceProperties">
        <property name="service"
value="http://localhost:8080/prosoc/j_spring_cas_security_check"/>
        <property name="sendRenew" value="false"/>
    </bean>
    <bean id="casProcessingFilter"
class="org.springframework.security.ui.cas.CasProcessingFilter">
        <sec:custom-filter after="CAS_PROCESSING_FILTER"/>
        <property name="authenticationManager" ref="authenticationManager"/>
        <property name="authenticationFailureUrl"
value="http://localhost:8080/prosoc/unsecured/error.action"/>
        <property name="defaultTargetUrl" value="/"/>
    </bean>
    <sec:authentication-manager alias="authenticationManager"/>
    <bean id="casAuthenticationProvider"
class="org.springframework.security.providers.cas.CasAuthenticationProvider">
        <sec:custom-authentication-provider />
        <property name="userDetailsService" ref="userDetailsService"/>
        <property name="serviceProperties" ref="serviceProperties" />
        <property name="ticketValidator">
            <bean
class="org.jasig.cas.client.validation.Cas20ServiceTicketValidator">
                <constructor-arg index="0"
value="https://localhost:8443/prosoc/cas"; />
                <property name="proxyGrantingTicketStorage"
ref="proxyGrantingTicketStorage" /><!-- Don't think this is needed -->
            </bean>
        </property>
        <property name="key" value="key_prosoc"/>
    </bean>
    <bean id="CASUnprotectedPageFilter"
class="uk.co.prodia.prosoc.security.spring.cas.CASUnprotectedPageFilter">
        <property name="ignoreFilesOfType"
value="css,js,gif,jpg,png,swf,pdf" />
        <property name="loginPage" value="login!goToLogin" />
        <sec:custom-filter after="SWITCH_USER_FILTER"/>
    </bean>
    <bean id="RemoveSavedRequestKeyFilter"
class="uk.co.prodia.prosoc.security.spring.RemoveSavedRequestKeyFilter">
        <property name="doNotRunFor"
value="/prosoc/forum/mvnforum/myprofile" />
        <sec:custom-filter after="PRE_AUTH_FILTER"/>
    </bean>
    <bean id="proxyGrantingTicketStorage"
class="org.jasig.cas.client.proxy.ProxyGrantingTicketStorageImpl" />
    <bean id="userDetailsService"
class="uk.co.prodia.prosoc.security.spring.cas.login.SpringSecurityUserDetailsService"/>
    
    <bean id="singleSignOutFilter"
class="org.jasig.cas.client.session.SingleSignOutFilter">
        <sec:custom-filter before="CONCURRENT_SESSION_FILTER"/>
    </bean>
   
</beans>


======================
web.xml
-------
I have removed parts such as welcome-file list 
and one Servlet which is quite large and whose purpose 
is to configure a CAPTCHA. 
======================

<web-app    xmlns="http://java.sun.com/xml/ns/j2ee"; 
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
            xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"; 
            version="2.4">
    
   <display-name>prosoc</display-name>
 
    <context-param>
                <param-name>contextConfigLocation</param-name>
                
<param-value>/WEB-INF/applicationContext-security.xml</param-value>
        </context-param>
    
    <filter>
        <filter-name>springSecurityFilterChain</filter-name>
       
<filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
    </filter>
    
    <filter>
        <filter-name>struts2</filter-name>
       
<filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
    </filter>

    <filter-mapping>
      <filter-name>springSecurityFilterChain</filter-name>
      <url-pattern>/*</url-pattern>
    </filter-mapping>
    
    <filter-mapping>
        <filter-name>struts2</filter-name>
        <url-pattern>/*</url-pattern>
        <dispatcher>REQUEST</dispatcher>
        <dispatcher>FORWARD</dispatcher>
    </filter-mapping>
    
    <listener>
       
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
    </listener>
    
    <servlet>
        <servlet-name>ProsocConfig</servlet-name>
        <servlet-class>uk.co.prodia.prosoc.Config</servlet-class>

        <init-param>
          <param-name>web.xml-display-name-not-defined-message</param-name>
          <param-value>
              Please define the display-name node in your web.xml with the
name of your web application.
          </param-value>
        </init-param>
        
        <init-param>
          <param-name>log4j-config-file</param-name>
          <param-value>/WEB-INF/classes/log4j.xml</param-value>
        </init-param>
        
        <init-param>
          <param-name>prosoc-spring-beans-definition-file</param-name>
          <!--
          This is stored in /WEB-INF/classes but Spring will automatically
find 
          it on the classpath so we only need to give the file name and not
the
          full path.
          -->
          <param-value>prosoc-spring-beans.xml</param-value>
        </init-param>
        
        <init-param>
            <param-name>application-properties-file</param-name>
            <param-value>prosoc.properties</param-value><!-- Must be in
/WEB-INF/classes -->
        </init-param>

        <load-on-startup>1</load-on-startup>
    </servlet>
    
</web-app>
-- 
View this message in context: 
http://www.nabble.com/Struts2-and-spring-plugin---Action-class--springManagedProsocActionUpdateEmail--not-found-tp18814302p18819168.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to