Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Struts 1.x Display Action Form property as simple text (label)

Tags:

java

jsp

struts

I am confused. It should be very obvious, but I cannot figure it out :(

How can I display Action Form property as simple text (label) in my .jsp page?

I can use <html:text> tag, for example, to create an input text field for the desired property but how can I simply display this value as plain text using Struts 1.x?

like image 893
Dime Avatar asked Jan 23 '26 20:01

Dime


1 Answers

<c:out value="${theActionForm.label}" /> using the JSTL or, if you really like Struts tags, <bean:write name="theActionForm" property="label" />.

This assumes that the action form is registered under the attribute name "theActionForm", and has a getLabel() method.

like image 153
JB Nizet Avatar answered Jan 26 '26 23:01

JB Nizet



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!