This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Java Interview Guide and have Anthony DePalma on-line!
See this thread for details.
The moose likes Struts and the fly likes How reset Struts form? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "How reset Struts form?" Watch "How reset Struts form?" New topic

How reset Struts form?

Honzak Troubak
Ranch Hand

Joined: Jan 11, 2013
Posts: 31
Hello guys,

I don't know how reset Struts form after submit.

Here is my form:

After submit of form is shows same page where is this form. But in form are still informations which I inserted in previous step.

Could anybody help me how reset the form? I want to use only Struts without javascript, etc.

I'm using Struts

Joe Ess

Joined: Oct 29, 2001
Posts: 9190

If you really want to, you could clear out the values in your action after processing them.
Think about the applications you use. In my experience the pattern is that there is a display page, maybe with line items or field names and values, with a link to a page to edit or add a line item. Once one submits the edits, the original page is displayed to indicate that changes have been made.

[How To Ask Questions On JavaRanch]
Honzak Troubak
Ranch Hand

Joined: Jan 11, 2013
Posts: 31
good idea, thank you
I agree. Here's the link:
subject: How reset Struts form?
It's not a secret anymore!