Hi all. Im new to struts. I have been reading up on it for about 2 days now. I am trying to get an autocompleter to work from a list populated by a database call. I understand that I can set up a class that adds things to a list. I can handle the database call, no problem. The problem I have is all the config thats required in struts.
Im currently using struts 2.1.
I have the following in my JSP:
with of course the
I also have the following in a class :-
and here's where I think I am going wrong. I have the following in struts.xml:-
and the following in the web.xml:-
but I get the error "The Struts dispatcher cannot be found. This is usually caused by using Struts tags without the associated filter. Struts tags are only usable when the request has passed through its servlet filter, which initializes the Struts dispatcher needed for this tag. - [unknown location]"
when visiting my jsp page. So I added the following to the web.xml:-
and then I get a HTTP 404.
Can anyone help. It's frustrating getting started with struts. I get the ideas behind it but cant get anything to actually work.
You cannot add an arbitrary collection of jars to a deployment, as each may introduce their own dependencies, or otherwise impact expected behavior. Stick to the minimum until you know what you're doing.
now it deploys fine when I deploy without the filter, but when I add the filter stuff into the web.xml I get an error. My guess is that the jar containing the required class is not there? - googling it but not having much luck.
You can't deploy the Spring plugin without deploying Spring.
Joined: May 29, 2009
OK. forgetting the spring jars the problem is still the same
The Struts dispatcher cannot be found. This is usually caused by using Struts tags without the associated filter. Struts tags are only usable when the request has passed through its servlet filter, which initializes the Struts dispatcher needed for this tag. - [unknown location]
DynamicMethodInvocation is something else entirely and would not have caused it to start working; it's only for using "action!method" URL patterns. DevMode just jacks up some reporting. If it started working after those changes then something else had been corrected, but not deployed.
No problem--it can be a frustrating process wrapping your head around something new sometimes.