Thanks Shoaib.

But, after giving the size 100 as : type="com.test.Line[100]", it throws a 
NullPointerException :

java.lang.NullPointerException: The type for property offerSlotslines is invalid
        at org.apache.struts.action.DynaActionForm.set(DynaActionForm.java:414)
        at 
org.apache.struts.action.DynaActionFormClass.newInstance(DynaActionFormClass.java:243)
        at org.apache.struts.util.RequestUtils.createActionForm(RequestUtils.java:821)
        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:760)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:358)
        at 
org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:294)
        at org.mortbay.jetty.servlet.Dispatcher.dispatch(Dispatcher.java:222)
        at org.mortbay.jetty.servlet.Dispatcher.forward(Dispatcher.java:135)
        at 
org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1069)
        at 
org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcessor.java:274)
        at 
org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:455)
        at 
org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(TilesRequestProcessor.java:320)
        at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:279)
        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:760)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:358)
        at 
org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:294)
        at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:567)
        at org.mortbay.http.HttpContext.handle(HttpContext.java:1807)
        at 
org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:525)
        at org.mortbay.http.HttpContext.handle(HttpContext.java:1757)
        at org.mortbay.http.HttpServer.service(HttpServer.java:879)
        at org.mortbay.http.HttpConnection.service(HttpConnection.java:790)
        at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:961)
        at org.mortbay.http.HttpConnection.handle(HttpConnection.java:807)
        at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:197)
        at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:276)
        at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:511)


-----Original Message-----
From: Mohammad Shoaib [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 18, 2004 10:45 AM
To: 'Struts Users Mailing List'
Subject: RE: DynaActionForm java.lang.ArrayIndexOutOfBoundsException


You have to specify the
Size here type="com.test.Line[]"

Or whatever is the initial size you specify in your action the zise should remain less 
that or equal to that size otherwise you will get this error.

Regards
Shoaib
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 18, 2004 1:13 PM
To: [EMAIL PROTECTED]
Subject: DynaActionForm java.lang.ArrayIndexOutOfBoundsException


Hi Everyone,


    I am using DynaActionForm. It is throwing ArrayIndexOutOfBoundsException. Not sure 
what the issue could be.


Can you pls help me.


<form-bean name="myForm" type="org.apache.struts.validator.DynaValidatorForm">
   <form-property name="lines" type="com.test.Line[]"/>
            <form-property name="lastSlotId" type="java.lang.String" />
            <form-property name="campaignId" type="java.lang.Integer" /> </form-bean>


Action mapping is :
<action path="/8200/123"
            type="com.test.myAction"
   name="MyForm"
            scope="session"
            input="/myJSP.jsp">
   <forward name="success" path="/8200/123.do"/>
  </action>


Thanks & Regds
Ravi





Confidentiality Notice


The information contained in this electronic message and any attachments to this 
message are intended for the exclusive use of the addressee(s) and may contain 
confidential or privileged information. If you are not the intended recipient, please 
notify the sender at Wipro or [EMAIL PROTECTED] immediately and destroy all copies of 
this message and any attachments.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





Confidentiality Notice

The information contained in this electronic message and any attachments to this 
message are intended
for the exclusive use of the addressee(s) and may contain confidential or privileged 
information. If
you are not the intended recipient, please notify the sender at Wipro or [EMAIL 
PROTECTED] immediately
and destroy all copies of this message and any attachments.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to