I may be mistaken, but I think that either 1) The code posted is not verbatim to what you're using or 2) The error isn't happening until AFTER clicking the submit button, in which case the problem is actually with searchResults.jsp
Joined: Jun 14, 2004
after this the jsp page was shown correctly, but after i click the submit button, i got a NullPointerException. In my corresponding ActionClass, i check to see if i receive any "form" in my execute method and all im getting is NULL, i even tried to set the scope="session" in the html:form tag and also in the actionmapping in struts-config.xml.....
i print out a message when the actionform is created and destroyed and when when i was using scope=request, i could see that the form is created before the action is called, but its also destroyed....hence i had tried using session scope....
btw i dont think that the next page searchResults.jsp is causing any error as i get this exception in the execute() method itself, before i can forward to the next page....
here is the new error message:
license info form created ..................... license info form deleted ..................... entering searchlicense action <Jun 17, 2004 11:16:26 AM PDT> <Error> <HTTP> <BEA-101017> <[ServletContext(id=1 6352912,name=webapp,context-path=/bits)] Root cause of ServletException. java.lang.NullPointerException at org.lapd.bits.struts.actions.SearchLicenseAction.executeAction(Search LicenseAction.java:45) at org.lapd.bits.struts.actions.ActionBase.execute(ActionBase.java:32)
org.apache.jasper.JasperException: Cannot retrieve definition for form bean null at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:254) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295) etc
I tried adding some of the parameters mentioned above to the form but they all produced new errors. For example when I added attribute there was a message about the tld. I have not found discussion of when it is name="myform" and when it is attribute="myform". Also find the changes from dots to slashes in URL/ URI / directory description mysterious. Any wise words welcome.
Joined: Sep 21, 2003
more detail Tutorial shows <html:form action="submit.do"> org.apache.jasper.JasperException: Cannot retrieve definition for form bean null
<html:form action="submit" name="submitForm"> org.apache.jasper.JasperException: Must specify type attribute if name is specified
<html:form action="submit" name="submitForm" attribute="submitForm"> org.apache.jasper.JasperException: /submit.jsp(24,0) Attribute attribute invalid according to the specified TLD
<html:form action="submitForm"> org.apache.jasper.JasperException: Cannot retrieve mapping for action /submitForm
<html:form action="submit.do" name="submitForm" attribute="submitForm"> org.apache.jasper.JasperException: /submit.jsp(24,0) Attribute attribute invalid according to the specified TLD