This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes Struts and the fly likes Advantage of Struts tag? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Advantage of Struts tag?" Watch "Advantage of Struts tag?" New topic
Author

Advantage of Struts tag?

Bandita Patel
Greenhorn

Joined: Mar 23, 2010
Posts: 25
why to use Struts tags instead of simple JSP tags? like, using <html:text> instead of input type=.... whats the advantage of it? Please explain it.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Perhaps if you looked at the output they generate and the attributes they used you'd have more of an idea? I'd say the form binding and error messages are the big ones.

Please see the JavaRanch naming policy and change your display name to conform with this policy. Thanks!
Ankit Garg
Sheriff

Joined: Aug 03, 2008
Posts: 9303
    
  17

The values automatically get filled for you if there is a FormBean property matching the name of the form element (like if I have an FormBean property age and a html:text on the JSP page with the name age, then the value of age in FormBean will automatically be filled into the text field) and you automatically get error messages if validation fails...

[Okay, beaten by David]


SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
 
GeeCON Prague 2014
 
subject: Advantage of Struts tag?