File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "data struts 2 form being lost!!" Watch "data struts 2 form being lost!!" New topic

data struts 2 form being lost!!

Lucas Grijander

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

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:
subject: data struts 2 form being lost!!
It's not a secret anymore!