• 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
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

why bother with struts HTML tags?

 
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
When you use the struts html tags, you have to make that page a jsp - as opposed to a form page being just standard HTML. What is the main reason you do <html:form> for example, over <form>.
I am reading the o'reilly struts book and it does not seem to provide any reason to use the struts html tags at all, apart from a comment alluding to "tighter integration" - no explanation.
All my struts stuff so far just uses standard html forms when possible, am I missing out out on something here?
Andles.
 
Author
Posts: 350
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
html:form looks up the ActionForm associated with the mapping. If the ActionForm is in scope (session or request settable in the action mapping), then the form will be populated with the values from the ActionForm.
 
Rick Hightower
Author
Posts: 350
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Also since the html:form is associated with the ActionForm it will make sure that hte properties you use are members of the ActionForm, e.g., html:text property="foo" will fail unless the ActionForm in scope has a property called foo (form.getFoo()).
 
Andles Jurgen
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for your response Rick.
re:
it will make sure that hte properties you use are members of the ActionForm
Not sure what the gain is here - my form fields were properties accessible in the action form anyway. Am I misunderstanding something?
Also, while I have you, did you read my post about the html:base tag and named anchors - reallly struggling with that one.
Andy
 
Come have lunch with me Arthur. Adventure will follow. This tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic