aspose file tools*
The moose likes Struts and the fly likes data struts 2 form being lost!! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "data struts 2 form being lost!!" Watch "data struts 2 form being lost!!" New topic
Author

data struts 2 form being lost!!

Lucas Grijander
Greenhorn

Joined: Feb 10, 2009
Posts: 9
Hi everyone!

I have a struts 2 form in which I collect some user information: name, surname, address... under a session variable.

In the same form, the user has a link to create a "workgroup", for what I have an <a href="<s:url action='YYY' namespace='/ZZZ'>"> linkX </a>
(I use s:submit to target a different action)

So, the problem is: the user fills some information, then she clicks on the link to create a new workgroup and when she returns to the previous page,
the data she entered is lost! (it seems data is not stored in session...)

I see the problem is using the href element to redirect to another action (data is not being transfered) but I can't figure out how to fix it, so any help, tip, advice, recommendation...
would be so much appreciated!!
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Without more details it'll be hard to help.

Clicking a link, however, won't submit a form, unless you write the JavaScript to make it do so.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: data struts 2 form being lost!!