• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

Struts calls reset before form is submitted

 
Ranch Hand
Posts: 385
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?

 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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).
 
please buy this thing and then I get a fat cut of the action:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic