What is the purpose of using <html: text instead of <input type = "text" in struts?
He will do magic. That is, if your form has a field with the name "bob" and you have html: text with the name "bob", then the value that you put in the bob field of the form inside the action will cause the displayed html input to be to be populated. If you just made a normal
The html: button, on the other hand, does (IIRC) the same as a regular button, but just exists, so you can place html: in front of everything in sequence. I think that if you use internationalized shortcuts, you can get a little benefit from the html: button, but you did nothing.
The only reason to use
<html:text
instead of the usual
<input type=text
- support for internationalization. Via
<html:text
we use an attribute key that names the value to be extracted from the Resource.properties file. Therefore, for internationalization, all we need to do is change the values stored in the keys in the resource.properties file, and nothing more.