Announcement Announcement Module
Collapse
No announcement yet.
[B] How to access the Action Form Bean Object from Spring Bean? [/B] Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • [B] How to access the Action Form Bean Object from Spring Bean? [/B]

    How to access the Action Form Bean Object from Spring Bean?

    I am using Struts framework on Spring core Container.
    I want to access the action form Bean object from a Spring bean. The Spring bean is being used for Injecting the Properties into the Action Class following that respective Form Bean.

    FOR Example:..!!

    Here is a sample of struts-config.xml fragment:

    <struts-config>
    ...
    ...

    <action-mappings>
    <action path="/xyz" type="org.springframework.web.struts.DelegatingAct ionProxy"
    validate="true" name="xyzForm">
    <forward name="success" path="/WEB-INF/views/success.jsp"/>
    <forward name="failure" path="/WEB-INF/views/failuer.jsp"/>
    </action>
    </action-mappings>

    <plug-in className="org.springframework.web.struts.ContextL oaderPlugIn">
    <set-property property="contextConfigLocation" value="/WEB-INF/beans.xml"/>
    </plug-in>

    ...
    ...
    </struts-config>


    And now a related sample of a /WEB-INF/beans.xml file:


    <xml version="1.0" encoding="UTF-8">
    <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">

    ...
    ...
    <beans>
    <bean id="empSearchService">
    <bean name="/xyz">
    <property name="MyActionForm"> <ref bean="...."/> <!-- Here I want to access the Action form as a refbean for the respective action path "/XYZ" -->
    </property>
    </bean>
    </beans>
    ...
    ...
    My basic requirement is that I want to get the Action Form Object that is being used for the particular action path , inside a bean..

    Can you please suggest ways and best way to do this..
    Please let me know if the above imformation is not clear and you need more imformaton on the issue..

    THANKS IN ADVANCE..
    Regards.!!!
    Last edited by argho; Mar 2nd, 2011, 11:26 PM. Reason: More Imformation to be added

  • #2
    Is
    "...
    <plug-in className="org.springframework.web.struts.ContextL oaderPlugIn">
    ..."

    plug-in usefull for fulfilling the above request.??!!

    Comment


    • #3
      is it possible in spring

      is it possible to do so , to resolve the above issue, i mean using spring, is the above scenario possible??

      Comment


      • #4
        Not Possibe in Spring

        I guess it is not possible using spring core container

        Comment

        Working...
        X