Greg, thanks for the advise. However I don't think those are the causes of the problem. I tried changing them and it didn't make a difference. I still got the NullPointerException.
--- Greg Pelly <[EMAIL PROTECTED]> wrote: > I think you have 2 errors in the HTML below > > 1. try changing action="/viewProjects" to > action="viewProjects" (not sure if > this is necessary) > 2. you need to use <html:hidden property="junk"> > rather than an <input> > > ------ > <html:form method="post" action="/viewProjects" > > <input type="hidden" name="junk" value="junk"/> > </html:form> > ---------- > Greg > > -----Original Message----- > From: > [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] > > Sent: Thursday, March 10, 2005 6:36 PM > To: user@struts.apache.org > Subject: DynaActionForm > > Hi folks, > I am using a DynaActionForm with an Action. I have > the following exception > when the form is submitted. > but if I use a regular ActionForm it's ok... what's > wrong? thanks in advance > > my form-bean: > <form-bean name="emptyForm" > type="org.apache.struts.action.DynaActionForm"> > <form-property name="junk" > type="java.lang.String"></form-property> > </form-bean> > > my action-mapping: > <action path="/viewProjects" name="emptyForm" > type="com.xxx.ViewProjectsAction"> > <forward name="success" > path="/calc/ProjectManager.jsp"/> > <forward name="failure" > path="/calc/AssessmentCalc.jsp"/> > </action> > my form: > <html:form method="post" action="/viewProjects" > > <input type="hidden" name="junk" value="junk"/> > </html:form> > > SRVE0068E: Could not invoke the service() method on > servlet action. > Exception thrown : > java.lang.NullPointerException > at > org.apache.struts.util.RequestUtils.createActionForm(RequestUtils.java:852) > at > org.apache.struts.action.RequestProcessor.processActionForm(RequestProcessor > .java:364) > at > org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:253) > at > org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482) > at > org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525) > at > javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled > Code)) > at > javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled > Code)) > at > com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java(C > ompiled > Code)) > at > com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper. > java(Compiled > Code)) > at > com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:2837) > at > com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:220) > at > com.ibm.ws.webcontainer.VirtualHost.handleRequest(VirtualHost.java:204) > at > com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java(Compile > d > Code)) > at > com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java(Compi > led > Code)) > at > com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(Ht > tpInboundLink.java(Compiled > Code)) > at > com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(Ht > tpInboundLink.java(Compiled > Code)) > at > com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLRea > dCallback.java(Compiled > Code)) > at > com.ibm.ws.tcp.channel.impl.WorkQueueManager.requestComplete(WorkQueueManage > r.java(Compiled > Code)) > at > com.ibm.ws.tcp.channel.impl.WorkQueueManager.attemptIO(WorkQueueManager.java > (Compiled > Code)) > at > com.ibm.ws.tcp.channel.impl.WorkQueueManager.workerRun(WorkQueueManager.java > (Compiled > Code)) > at > com.ibm.ws.tcp.channel.impl.WorkQueueManager$Worker.run(WorkQueueManager.jav > a(Compiled > Code)) > at > com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java(Compiled > Code)) > > > > __________________________________ > Do you Yahoo!? > Yahoo! Small Business - Try our new resources site! > http://smallbusiness.yahoo.com/resources/ > > --------------------------------------------------------------------- > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > > __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]