Finally I found the root cause.
It seems I had some Spring jars of an earlier version in my Tomcat lib
directory on my dev machine, since I have more than one version of tomcat on my
system I was looking in the wrong instance of tomcat when I was trying identify
the cause. Sometimes I am such
Hi Lukasz,
Thank you for your reply.
I defined my action like so:
http://struts.apache.org/dtds/struts-2.0.dtd";>
confirmRegister.jsp
/register.jsp
/error.jsp
However this will throw an exception:
SEVERE: Dispatcher initialization
Hi Dave,
Thanks for your reply.
I tried setting the scope of the action bean to prototype (amoung 100 other
things) but it didn't change the behaviour. I'm using Struts2 with Sping
plugin, jdk1.8.0_51.
If it wasn't calling the setter that would make more sense, but sine it is
calling
How do you declare the action in struts.xml? Because instead full
class name you must use the id from applicationContext.xml
http://struts.apache.org/dtds/struts-2.0.dtd";>
success.jsp
https://struts.apache.org/docs/spring-plugin.html#SpringPlugin-Initial
Not sure, but if nothing else the action should be set to `prototype`
scope, as they're instantiated per-request.
Are you using the Struts 2 Spring plugin?
On Sat, Sep 5, 2015 at 8:47 AM, Chris wrote:
> I'm trying to use the Spring plugin to inject a dependency into my action
> at runtime. This
I'm trying to use the Spring plugin to inject a dependency into my action at
runtime. This is the first time I've tried this with Struts2 so I may have
missed something but I'm stumped because I can see the dependency is injected
but then the object is later null when I need to use it. Here is m
6 matches
Mail list logo