Hi Igor - 

Well, the filter was included with the wicket quickstart maven package, and
the servlet I copied from the wicket wiki. What should I change in the
filter?

And, is it 'wrong' to have both servlet and filter defined? 

Thanks again,
Jin


igor.vaynberg wrote:
> 
> you changed it for the servlet but not for the filter? why do you have
> both defined?
> 
> -igor
> 
> 
> On 10/20/07, auron <[EMAIL PROTECTED]> wrote:
>>
>> Hi Igor -
>>
>> Thanks alot for your help, I really appreciate it -
>>
>> I knew I was missing something, thanks for pointing me towards the right
>> direction. I editied my web.xml as necessary but for some reason,
>> authenticationManager is still not getting injected. Would you mind
>> looking
>> through my web.xml to make sure things are in order?
>>
>> Once again, thank you very much for your time -
>>
>> Jin
>>
>> <?xml version="1.0" encoding="ISO-8859-1"?>
>> <web-app xmlns="http://java.sun.com/xml/ns/j2ee";
>>          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>>          xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
>> http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";
>>          version="2.4">
>>
>>         <display-name>edu_ucsd_acp</display-name>
>>         <!-- Instantiate an application factory for spring to inject into
>> wicket's
>> application class -->
>>         <servlet>
>>         <servlet-name>wicket</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>1</load-on-startup>
>>         </servlet>
>>          <!--
>>               There are three means to configure Wickets configuration
>> mode and
>> they are
>>               tested in the order given.
>>               1) A system property: -Dwicket.configuration
>>               2) servlet specific <init-param>
>>               3) context specific <context-param>
>>               The value might be either "development" (reloading when
>> templates
>> change)
>>               or "deployment". If no configuration is found,
>> "development" is the
>> default.
>>         -->
>>         <filter>
>>                 <filter-name>Acegi HTTP Request Security
>> Filter</filter-name>
>>
>> <filter-class>org.springframework.security.util.FilterToBeanProxy</filter-class>
>>                 <init-param>
>>                         <param-name>targetClass</param-name>
>>
>> <param-value>org.springframework.security.util.FilterChainProxy</param-value>
>>                 </init-param>
>>     </filter>
>>
>>     <context-param>
>>         <param-name>contextConfigLocation</param-name>
>>         <param-value>/WEB-INF/applicationContext*.xml</param-value>
>>     </context-param>
>>
>>     <filter-mapping>
>>         <filter-name>Acegi HTTP Request Security Filter</filter-name>
>>         <url-pattern>/*</url-pattern>
>>     </filter-mapping>
>>    <filter>
>>                 <filter-name>wicket.edu_ucsd_acp</filter-name>
>>                
>> <filter-class>org.apache.wicket.protocol.http.WicketFilter</filter-class>
>>                 <init-param>
>>                         <param-name>applicationClassName</param-name>
>>                        
>> <param-value>edu.ucsd.acp.web.WicketApplication</param-value>
>>                 </init-param>
>>         </filter>
>>
>>         <filter-mapping>
>>                 <filter-name>wicket.edu_ucsd_acp</filter-name>
>>                 <url-pattern>/*</url-pattern>
>>         </filter-mapping>
>>
>>         <!--
>>         - Loads the root application context of this web app at startup,
>>         - by default from "/WEB-INF/applicationContext.xml".
>>         - Use
>> WebApplicationContextUtils.getWebApplicationContext(servletContext)
>>         - to access it anywhere in the web application, outside of the
>> framework.
>>         -->
>>         <listener>
>>
>> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
>>         </listener>
>> </web-app>
>>
>>
>> igor.vaynberg wrote:
>> >
>> > thats exactly how you do it, the piece you are missing is that you
>> > need to tell wicket to pull your application object out of spring
>> > context rather then create a new instance. see
>> > SpringWebApplicationFactory and its javadoc.
>> >
>> > -igor
>> >
>> >
>> > On 10/20/07, auron <[EMAIL PROTECTED]> wrote:
>> >>
>> >> Hi everyone,
>> >>
>> >> On this page:
>> >>
>> >> http://cwiki.apache.org/WICKET/acegi-and-wicket-auth-roles.html
>> >>
>> >> there is a section that w/ the following code:
>> >>
>> >> public class WicketApplication extends AuthenticatedWebApplication {
>> >>         //to be injected by Spting
>> >>         private AuthenticationManager authenticationManager;
>> >>
>> >> [...]
>> >>
>> >> I am new to both wicket, spring, and acegi, so please forgive me if
>> the
>> >> answer is obvious, but how do I inject authenticationManager into
>> >> WicketApplication? I have a setAuthenticationManager method and in my
>> >> applicationContext.xml I have the following:
>> >>
>> >> <bean id="webApplication" class="edu.ucsd.acp.web.WicketApplication">
>> >>         <property name="authenticationManager"
>> >> ref="authenticationManager"/>
>> >> </bean>
>> >> <bean id="authenticationManager"
>> >> class="org.springframework.security.providers.ProviderManager">
>> >>         <property name="providers">
>> >>                 <list>
>> >>                         <ref bean="daoAuthenticationProvider"/>
>> >>                 </list>
>> >>         </property>
>> >> </bean>
>> >>
>> >> Any help is greatly appreciated, thank you!
>> >>
>> >> Jin
>> >> --
>> >> View this message in context:
>> >>
>> http://www.nabble.com/spring-acegi-injection-question-tf4658329.html#a13310889
>> >> Sent from the Wicket - User mailing list archive at Nabble.com.
>> >>
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> >> For additional commands, e-mail: [EMAIL PROTECTED]
>> >>
>> >>
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: [EMAIL PROTECTED]
>> > For additional commands, e-mail: [EMAIL PROTECTED]
>> >
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/spring-acegi-injection-question-tf4658329.html#a13322945
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/spring-acegi-injection-question-tf4658329.html#a13324140
Sent from the Wicket - User mailing list archive at Nabble.com.


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

Reply via email to