File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes Struts calls reset before form is submitted 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 "Struts calls reset before form is submitted" Watch "Struts calls reset before form is submitted" New topic
Author

Struts calls reset before form is submitted

Siva Masilamani
Ranch Hand

Joined: Sep 19, 2008
Posts: 385
Hi i have a doubt about the reset method when the jsp is called.

Please find my code below.







When i type the url for the jsp page. e.g.http://localhost:8084/TestStrutsCheck/gotoIndex1.jsp

I see the reset method of the form has been called even before the form is submitted and printed out the message.

If it has been called then i think there should be an instance for the form class if so,why is my Logic:present tag fails in that case?(it did not display Hello in the page)

please explain,why struts call reset before displaying jsp?


SCJP 6,SCWCD 5,SCBCD 5

Failure is not an option.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Struts calls "reset" so the form is reset...

You're searching for a bean with a specified name in scope--that's not the name of the action form that's in scope. ActionForms are in scope under whatever key Struts uses to find it (I forget off the top of my head).
 
 
subject: Struts calls reset before form is submitted