Announcement Announcement Module
No announcement yet.
[B] How to access the Action Form Bean Object from Spring Bean? [/B] Page Title Module
Move Remove Collapse
Conversation Detail Module
  • 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:


    <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"/>

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


    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" "">

    <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" -->
    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..

    Last edited by argho; Mar 3rd, 2011, 12:26 AM. Reason: More Imformation to be added

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

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


    • #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??


      • #4
        Not Possibe in Spring

        I guess it is not possible using spring core container