It would be interesting indeed if the Struts2 spring integration was really
just a re-badged Spring MVC application....
I so dislike magic, but I agree it works.
newton.dave wrote:
>
> Isn't... that for a Spring MVC app?
>
> Dave
>
> Martin Gainty wrote:
>> your ActionController class extends MultiActionController as seen here..
>> /**
>> * MultiActionController for the image list/upload UI.
>> * @author Juergen Hoeller
>> * @since 07.01.2004
>> */
>> public class ImageController extends MultiActionController {
>>
>> where /WEB-INF/web.xml contains:
>> <!--
>> - Spring web MVC servlet that dispatches request to registered
>> handlers.
>> - Has its own application context, by default defined in
>> "{servlet-name}-servlet.xml",
>> - i.e. "image-servlet.xml" in this case.
>> -
>> - A web app can contain any number of such servlets.
>> - Note that this web app has a shared root application context,
>> serving as parent
>> - of all DispatcherServlet contexts.
>> -->
>> <servlet>
>> <servlet-name>image</servlet-name>
>>
>> <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
>> <load-on-startup>2</load-on-startup>
>> </servlet>
>>
>> .......where {servlet-name}-servlet.xml contains.......
>> <?xml version="1.0" encoding="UTF-8"?>
>> <!--
>> - DispatcherServlet application context for the image database.
>> -->
>> <beans xmlns="http://www.springframework.org/schema/beans"
>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>> xmlns:context="http://www.springframework.org/schema/context"
>> xsi:schemaLocation="http://www.springframework.org/schema/beans
>> http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
>> http://www.springframework.org/schema/context
>> http://www.springframework.org/schema/context/spring-context-2.5.xsd">
>>
>> <!-- Activates @Autowired for ImageController -->
>> <context:annotation-config/>
>>
>> <!-- MultiActionController that defines user interface actions as
>> separate methods -->
>> <bean id="imageController"
>> class="org.springframework.samples.imagedb.web.ImageController"/>
>>
>>
>> HTH
>> Martin
>>
>> ______________________________________________
>> Disclaimer and confidentiality note
>> Everything in this e-mail and any attachments relates to the official
>> business of Sender. This transmission is of a confidential nature and
>> Sender does not endorse distribution to any party other than intended
>> recipient. Sender does not necessarily endorse content contained within
>> this transmission.
>>
>>
>>
>>
>>> Date: Mon, 26 Jan 2009 21:41:21 +0100
>>> Subject: Re: Spring Scope Default
>>> From: [email protected]
>>> To: [email protected]
>>>
>>> 2009/1/26 dusty <[email protected]>:
>>>> Interesting. So I am being lazy by not looking at the code first; How
>>>> does
>>>> it register the new action object with Spring so its services can be
>>>> autowired in?
>>> I don't know exactly but it works ;-)
>>>
>>>
>>> Regards
>>> --
>>> Lukasz
>>> http://www.lenart.org.pl/
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: [email protected]
>>> For additional commands, e-mail: [email protected]
>>>
>>
>> _________________________________________________________________
>> Windows Live™ Hotmail®…more than just e-mail.
>> http://windowslive.com/howitworks?ocid=TXT_TAGLM_WL_t2_hm_justgotbetter_howitworks_012009
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>
>
--
View this message in context:
http://www.nabble.com/Spring-Scope-Default-tp21660528p21679347.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]