Note that there are some explanatory texts on larger screens.

plurals
  1. POSpring beans injected into JSF Managed Beans
    primarykey
    data
    text
    <p>Problem Description: My injected Spring bean defined as a Managed-Property to a JSF backing bean is not being instantiated. Its always coming up null when I retreive the Managed-Bean. </p> <p>I have been fighting with this all day and it seems that JSF Managed Bean just won't read out of the applicationContext from Spring. I can manually pull out the bean by using the FacesContext in a backing bean and it finds the bean but when I try and inject it through the FacesConfig it always comes out null. I included my steps below how I integrated it. Any suggestions? </p> <h3>Configuration</h3> <p>Icefaces 1.85</p> <p>JSF 1.2 (through ice faces servlet)</p> <p>Spring 3.0</p> <p>Websphere 7.5 ( Which is eclipse 3.5 I think )</p> <h2>Web.xml Configuration Changes</h2> <h3>Spring Context Loader Listener</h3> <pre><code> &lt;listener&gt; &lt;display-name&gt;SpringListener&lt;/display-name&gt; &lt;icon&gt; &lt;small-icon&gt;small.gif&lt;/small-icon&gt; &lt;large-icon&gt;large.gif&lt;/large-icon&gt; &lt;/icon&gt; &lt;listener-class&gt;org.springframework.web.context.ContextLoaderListener&lt;/listener-class&gt; &lt;/listener&gt; </code></pre> <h3>Context Config</h3> <pre><code>&lt;context-param&gt; &lt;param-name&gt;contextConfigLocation&lt;/param-name&gt; &lt;param-value&gt; /WEB-INF/SpringConfig/SpringHelloWorld.xml &lt;/param-value&gt; &lt;/context-param&gt; </code></pre> <h2>FacesContext Changes</h2> <h3>Variable Resolver - AKA The Glue</h3> <p><code>&lt;application&gt;&lt;variable-resolver&gt;org.springframework.web.jsf.DelegatingVariableResolver&lt;/variable-resolver&gt;&lt;/application&gt;</code></p> <h3>Managed Bean</h3> <pre><code> &lt;managed-bean&gt; &lt;managed-bean-name&gt;testData&lt;/managed-bean-name&gt; &lt;managed-bean-class&gt;src.test.TestData&lt;/managed-bean-class&gt; &lt;managed-bean-scope&gt;session&lt;/managed-bean-scope&gt; &lt;managed-property&gt; &lt;property-name&gt;spring3HelloWorldBean&lt;/property-name&gt; &lt;value&gt;#{spring3HelloWorldBean}&lt;/value&gt; &lt;/managed-property&gt; &lt;/managed-bean&gt; </code></pre> <h3>Spring.xml Config</h3> <pre><code>&lt;bean id="spring3HelloWorldBean" class="src.test.Spring3HelloWorld" /&gt; </code></pre> <p></p> <p>Thanks in advance</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload