You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by ra...@wipro.com on 2004/08/18 07:13:04 UTC

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 Mailadmin@wipro.com immediately
and destroy all copies of this message and any attachments.

RE: DynaActionForm java.lang.ArrayIndexOutOfBoundsException

Posted by Mohammad Shoaib <sh...@vmoksha.com>.
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: ravi.vedala@wipro.com [mailto:ravi.vedala@wipro.com] 
Sent: Wednesday, August 18, 2004 1:13 PM
To: user@struts.apache.org
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
Mailadmin@wipro.com immediately
and destroy all copies of this message and any attachments.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org