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: lukasz.len...@googlemail.com
To: user@struts.apache.org

2009/1/26 dusty <dustin_pea...@yahoo.com>:
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: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org


_________________________________________________________________
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: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Reply via email to