Announcement Announcement Module
Collapse
No announcement yet.
ServletContextResource bean Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • ServletContextResource bean

    Is there a more succinct way of specifying the following?

    Code:
         <bean id="defaultMemberImage" class="org.springframework.beans.factory.config.MethodInvokingFactoryBean">
                <property name="targetObject">                    
                    <bean class="org.springframework.web.context.support.ServletContextResource">
                        <constructor-arg index="0">
                            <bean class="org.springframework.web.context.support.ServletContextFactoryBean"/>
                        </constructor-arg>
                        <constructor-arg index="1">
                            <value>/images/default.gif</value>
                        </constructor-arg> 
                    </bean>
                </property>
                <property name="targetMethod">
                    <value>getFile</value>
                </property>
            </bean>
    Which I saw here:

    http://forum.springframework.org/arc...p/t-21208.html

    But it doesn't work and there is no documenation supporting it.

    Ideally it could also return a byte[]
    Last edited by btiernay; Feb 12th, 2008, 03:01 PM.
Working...
X