This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Saving user enter values in a form

 
Andy WongK
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a struts form. Inside the form, there is a hyperlink that will redirect the user to the "Create email address" page, which the user can submit the 2nd page to create the email address. Once the submission is completed, it will redirect back to the first page. Now my problem is, any info the user enters on the first page is lost since it is a hyperlink redirect, not form submission so Struts won't populate the form bean on the first page.

Any suggestions on how to solve the problem?
 
michelle Wang
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, for your pbm, I have done a similer one and it works.

U said Once the submission is completed, it will redirect back to the first page, but it is a hyperlink redirect. I use meta to redirect the page to an action but not a static page, like this:

<META HTTP-EQUIV="refresh" CONTENT="0;URL=http://localhost:8080/myApp/action/ShowEntryFormAction.do">

So I guess you can do this:
I believe to display the first page (which is that form), you should have an action class right? So just in the create email page (second page), you redirect it to call your first page's action class again, so all the form Bean's info will be displayed again.

Hope this helps.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic