You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Eric Reagan <re...@gmail.com> on 2010/03/24 20:29:16 UTC
Spring problems
I am trying to setup a spring application and I can't seam to get past a
NoWebApplicationContext found.
I have followed the online tutorials (and the example code from the 1.4.7
directory) and I am still not having any luck.
In my web.xml file I have
....
<servlet>
<servlet-name>servlet</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>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/springContext.xml</param-value>
</context-param>
....
in my springContext.xml file I have
<bead id="wicketApp" class="pathToMyApplication" />
and in my WebApplication file I have the generic default constructor
...
init()
getDebugSettings().setDevelopmentUtilitiesEnabled(true);
addComponentInstantiationListener(new
SpringComponentInjector(this));
Is there something I am missing in setting up Wicket and Spring?
thank you for the help.
--
Eric Reagan
Re: Spring problems
Posted by James Carman <jc...@carmanconsulting.com>.
If you want an example that works out-of-the-box, check out:
http://svn.carmanconsulting.com/public/wicket-advanced/trunk
On Wed, Mar 24, 2010 at 3:29 PM, Eric Reagan <re...@gmail.com> wrote:
> I am trying to setup a spring application and I can't seam to get past a
> NoWebApplicationContext found.
>
> I have followed the online tutorials (and the example code from the 1.4.7
> directory) and I am still not having any luck.
>
> In my web.xml file I have
>
> ....
> <servlet>
> <servlet-name>servlet</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>
>
>
> <context-param>
> <param-name>contextConfigLocation</param-name>
> <param-value>/WEB-INF/springContext.xml</param-value>
> </context-param>
>
> ....
>
> in my springContext.xml file I have
> <bead id="wicketApp" class="pathToMyApplication" />
>
> and in my WebApplication file I have the generic default constructor
>
> ...
> init()
> getDebugSettings().setDevelopmentUtilitiesEnabled(true);
> addComponentInstantiationListener(new
> SpringComponentInjector(this));
>
> Is there something I am missing in setting up Wicket and Spring?
>
> thank you for the help.
> --
> Eric Reagan
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Spring problems
Posted by Martin Phee <mp...@objectivearts.com>.
The SpringWebApplicationFactory is the to create the WebApplicaiton.
You still need to setup spring properly.
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>
classpath:spring-annotation.xml
classpath:spring-hibernate.xml
classpath:spring-resources.xml
classpath:spring-security.xml
classpath:spring-mail.xml
</param-value>
</context-param>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener
</listener-class>
</listener>
<listener>
<listener-class>org.springframework.web.context.request.RequestContextListener
</listener-class>
</listener>
On Mar 24, 2010, at 2:29 PM, Eric Reagan wrote:
> I am trying to setup a spring application and I can't seam to get
> past a
> NoWebApplicationContext found.
>
> I have followed the online tutorials (and the example code from the
> 1.4.7
> directory) and I am still not having any luck.
>
> In my web.xml file I have
>
> ....
> <servlet>
> <servlet-name>servlet</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>
>
>
> <context-param>
> <param-name>contextConfigLocation</param-name>
> <param-value>/WEB-INF/springContext.xml</param-value>
> </context-param>
>
> ....
>
> in my springContext.xml file I have
> <bead id="wicketApp" class="pathToMyApplication" />
>
> and in my WebApplication file I have the generic default constructor
>
> ...
> init()
> getDebugSettings().setDevelopmentUtilitiesEnabled(true);
> addComponentInstantiationListener(new
> SpringComponentInjector(this));
>
> Is there something I am missing in setting up Wicket and Spring?
>
> thank you for the help.
> --
> Eric Reagan
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org