Hi to all.
I have a problem with a logic:iterate tag. I'm using
Struts 1.3.
I have to populate a select with data read from db (by invoking the first Action). When a select option is selected in the
jsp, I have to invoke a second Action (on the same jsp page) which has to perform some operations and remember the previous selected option (in the select).
I show you my source code for semplicity.
Here is my ActionForm.
*******************************
CreazioneProfiloUtenteForm.java
*******************************
First, the ToCreazioneProfiloUtenteAction action is invoked. This action reads data from db and insert them in the ArrayList 'listaSport'; at the end, this ArrayList is setted in the request.
***********************************
ToCreazioneProfiloUtenteAction.java
***********************************
Then creazioneProfiloUtente.jsp is invoked. I have a select 'sport' that reads the collections in the ArrayList 'listaSport'. Then, I have to store in hidden fields the values of the 'listaSport' arraylist in order to avoid, in the second Action, to re-access to db to read the same values. In order to do so, I use logic:iterate but I have problems with it. I confirm that if I delete from source code the tag logic:iterate, all works well.
**************************
creazioneProfiloUtente.jsp
**************************
This is the second Action, which should be invoked when a select option is selected by user. Unfortunately, this Action is never accessed because I got a
java NullPointerException before.
*****************************************
CaricamentoRuoliAttributiSportAction.java
*****************************************
*********
EXCEPTION
*********
*****************
STRUTS-CONFIG.XML
*****************
I can't understand where is the problem.
Can you help me?
Thanks to all in advance.
Bye bye.