JspException: Must specify type attribute if name is specified
I just upgraded to last nights build and get the following error: javax.servlet.jsp.JspException: Must specify type attribute if name is specified at org.apache.struts.taglib.html.FormTag.lookup(FormTag.java:669) at org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:441) at /getstarted/regstep1.jsp._jspService(/getstarted/regstep1.jsp.java:84) (JSP page line 47) This is the line in the .jsp it is complaining about: form:form name="registrationForm" action="regstep1.do" And this is what I have in struts-config.xml: form-bean name="registrationForm" type="com.mas.ebiz.asp.register.RegistrationForm"/ and !-- Seller Registration - Selection of plan -- action path="/regstep1" type="com.mas.ebiz.asp.register.SaveRegistrationAction" name="registrationForm" scope="session" validate="true" forward name="success" path="/getstarted/regstep2.jsp"/ forward name="failure" path="/getstarted/regstep1.jsp"/ /action I do seem to be passing the type, so I'm not sure why I get an error? Any pointers for places for me to look? When I upgraded, I updated the struts.jar and copied in the latest .tlds. Thanks, Neal
Re: JspException: Must specify type attribute if name is specified
Neal Kaiser wrote: I just upgraded to last nights build and get the following error: javax.servlet.jsp.JspException: Must specify type attribute if name is specified at org.apache.struts.taglib.html.FormTag.lookup(FormTag.java:669) at org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:441) at /getstarted/regstep1.jsp._jspService(/getstarted/regstep1.jsp.java:84) (JSP page line 47) This is the line in the .jsp it is complaining about: form:form name="registrationForm" action="regstep1.do" If you specify name here, you must also specify type. If you change this to: form:form action="regstep1.do" The tag will be smart enough to figure out what form bean name you want, without having to specify it both here and in struts-config.xml. By the way, you should switch to using the "html" library rather than "form". The old name will still work in Struts 1.0 (and the tags are all the same), but it is deprecated. Craig