Hi,

I'm curerntly having problems with sessions in Struts.

I have two JSP's both of which point to the same action.

In my first JSP I have a number of basic properties and a list of addresses
as shown below:

*Name:  Bill Blah
*Age:  23

* Addresses (list)
23 Glamorgan Street  |  ER34 5RT  | Edit | Delete
13 Glamorgan Street  |  ER34 6TT  | Edit | Delete

The addresses are simply displayed using a logic:iterate tag.  

I also supply a link on this page to add an address in a seperate page,
this JSP allows a user to add an address to the list in the first page. 
When the page is submitted it is simply added to in the actionform.

Once I've entered the new address using this second page I'm returned
tot he first page where the new address is shown in the list of addresses.
the problem I have is that when I add a second address it removes the
first address and only the second address is shown here as:

* Addresses (list)
13 Glamorgan Street  |  ER34 6TT  | Edit | Delete

instead of 

* Addresses (list)
23 Glamorgan Street  |  ER34 5RT  | Edit | Delete
13 Glamorgan Street  |  ER34 6TT  | Edit | Delete

I'm assuming this is a problem with the session, could somebody please explain to
me why this happening.  I have set the scope to session for both JSP pages and
both JSP pages use the same action form so why is this happening?

Many thanks,
Jon.


*---------------------------------------------*
 Jonathan Holloway,               
 Dept. Of Computer Science,       
 Aberystwyth University, 
 Ceredigion,                      
 West Wales,                      
 SY23 3DV.                        
                                  
 07968 902140                     
 http://users.aber.ac.uk/jph8     
*---------------------------------------------*

Reply via email to