What is the purpose of using <html: text instead of <input type = "text" in struts?

in programming struts we use <html:textinstead <input type="text"But we can use <input type="text", and it will work and what is the specific reason for using the tag <html:text? can anyone answer me please?

+3
source share
3 answers

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.

+1
source

. , name , value - EL, . HTML, <html:text>, .

0

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.

0
source

Source: https://habr.com/ru/post/1780250/


All Articles