This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I am attempting in implement DynaValidatorForm forms in a small scale Struts application. When I run the jsp making reference to a dynavalidatorform bean I get a javax.servlet.jsp.JspException exception with a message "Cannot find bean: .... in any scope".
As this is the first step in my conversion process, the application defs are VERY simple (see below).
One curious thing about this is if I change the type attribute in the form-bean definition to a class that does not exist like "this.class.does.not.exist" I get EXACTLY the same problem ... which leads me to think that the DynaValidatorForm class cannot be either located or loaded. However (tomcat V5 environment), I can see the referenced class in the WEB-INF/lib/struts-core-1.3.5.jar file?
This is probably some simple oversight on my part, but being new to DynaLalidator's is probably making me blind to the problem. This is driving me nutty. Can anyone offer help?
What you've shown us looks OK. Now show us your JSP. Of particular interest is the <html:form> tag and any other tags that make reference to the form bean. Nine times out of ten, this error is the result of a simple spelling error. Did you spell the action path and/or bean name correctly in the JSP?
Thank you for the reply ... which was right on target. I was so sure the problem was in the XML that I never closely examined the JSP. The kick to the head that you provided is what got me to look at the JSP and find the problem (which was a html:form tag referncing the wrong action and therefore the wrong bean).