http://cwiki.apache.org/WW/spring.html

<!-- config contextLoaderListener to extract spring config params -->
web.xml
<listener>
    
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>



Register your objects via the Spring configuration
<!--spring manages com.my.BarClass as id ="bar" -->



applicationContext.xml

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" 
"http://www.springframework.org/dtd/spring-beans.dtd";>
<beans default-autowire="autodetect">
    <bean id="bar" class="com.my.BarClass" singleton="false"/>
    ...
</beans>
<!-- The singleton attribute is set to false, meaning that Spring will create a 
new Action class upon each request, as Struts 1 would do. -->
<!-- works well for stateful beans which carry new information for each 
request-->

<!-- struts.xml  maps URI -> action -> Spring bean -->
<!DOCTYPE struts PUBLIC
    "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
    "http://struts.apache.org/dtds/struts-2.0.dtd";>
<struts>
    <include file="struts-default.xml"/>

    <package name="secure" namespace="/secure" extends="default">
        <action name="bar" class="bar">
            <result>bar.ftl</result>
        </action>
    </package>
</struts><!--action name="bar" maps class="Bar" to bean id="bar" which is a 
stateful Bean called BarClass whose params are extracted by spring 
ContextLoaderListener -->

http://www.springsource.org/aboutspring
(replace all refs to Tapestry or JSF with Struts)

HTH
Martin Gainty 
______________________________________________ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
 
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est 
interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
quel effet légalement obligatoire. Étant donné que les email peuvent facilement 
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
pour le contenu fourni.




> Date: Mon, 8 Jun 2009 05:40:26 -0400
> From: newton.d...@yahoo.com
> To: user@struts.apache.org
> Subject: Re: Migration: webwork to struts2 help.
> 
> gwen harold autencio wrote:
> >  INFO org.apache.struts2.spring.StrutsSpringObjectFactory - Initializing 
> > Struts-Spring integration...
> > 18192 [WrapperSimpleAppMain] ERROR 
> > org.apache.struts2.spring.StrutsSpringObjectFactory - ********** FATAL 
> > ERROR STARTING UP STRUTS-SPRING INTEGRATION **********
> > Looks like the Spring listener was not configured for your web app! 
> > Nothing will work until WebApplicationContextUtils returns a valid 
> > ApplicationContext.
> > You might need to add the following to web.xml: 
> >     <listener>
> >         
> > <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
> >     </listener>
> 
> If you're using Spring, do you have that?
> 
> If you're not, the Struts 2 Spring plugin from your app.
> 
> Dave
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
> 

_________________________________________________________________
Hotmail® has ever-growing storage! Don’t worry about storage limits. 
http://windowslive.com/Tutorial/Hotmail/Storage?ocid=TXT_TAGLM_WL_HM_Tutorial_Storage_062009

Reply via email to