Hello lars vonk,

I find I have two WebApplication: aWebApplication, bWebApplication
and  aWebApplication inject the spring context(in the web.xml), 
and  b havenot inject. but

bWebApplication extends aWebApplication{}

in bWebApplication I call the method following:
aWebApplication app = (bWebApplication) RequestCycle.get().getApplication();
app.getFacade();// it's NULL 

I think the mostly reason is that! 
How to config two Application with spring inject?
thinks.




        <context-param>
                <param-name>applicationBean</param-name>
                <param-value>wicketApplication</param-value>
        </context-param>
        <context-param>
                <param-name>contextConfigLocation</param-name>
                <param-value>
                        
/WEB-INF/applicationContext.xml,/WEB-INF/cms-Context.xml,
                </param-value>
        </context-param>
        
        <listener>
                
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
        </listener>

<!--It is the APP inject the spring context--->
        <servlet>
                <servlet-name>WicketApplication</servlet-name>
                <servlet-class>
                        org.apache.wicket.protocol.http.WicketServlet
                </servlet-class>
                <init-param>
                        <param-name>applicationFactoryClassName</param-name>
                        
<param-value>org.apache.wicket.spring.SpringWebApplicationFactory</param-value>
                </init-param>           
                <load-on-startup>0</load-on-startup>
        </servlet>
        
        
        <!-- View Application here, It not inject spring, but extends    -->    
        <servlet>
                <servlet-name>bApplication</servlet-name>
                <servlet-class>
                        org.apache.wicket.protocol.http.WicketServlet
                </servlet-class>
                <init-param>
                        <param-name>applicationClassName</param-name>
                        
<param-value>cn.meadlai.cms.view.wicket.bApplication</param-value>
                </init-param>
                <load-on-startup>0</load-on-startup>
        </servlet>



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to