D
Dave
I think this is a simple struts question....
I want to display information on a page in a static way. That is, not
as part of text elements. I can't find an appropriate struts tag to
use.
This what I did find. The form bean will be named the same as the
"name" attribute of the <form-bean> element in the struts-config.xml.
So if I have a form bean with 2 string properties, such as str1 and
str2, I can get the values on my jsp this way:
<jsp:useBean
id="DataForm"
scope="session"
type="com.mycompany.DataForm" />
...
<p>Str1 : <%=DataForm.getStr1()%></p>
<p>Str2 : <%=DataForm.getStr2()%></p>
But that doesn't seem like the right way to do this. I expected some
kind of special tag that I'll call "getprop":
<p>Str1 : <html:getprop property="str1"></p>
<p>Str2 : <html:getprop property="str2"></p>
What is the right way to do this?
I want to display information on a page in a static way. That is, not
as part of text elements. I can't find an appropriate struts tag to
use.
This what I did find. The form bean will be named the same as the
"name" attribute of the <form-bean> element in the struts-config.xml.
So if I have a form bean with 2 string properties, such as str1 and
str2, I can get the values on my jsp this way:
<jsp:useBean
id="DataForm"
scope="session"
type="com.mycompany.DataForm" />
...
<p>Str1 : <%=DataForm.getStr1()%></p>
<p>Str2 : <%=DataForm.getStr2()%></p>
But that doesn't seem like the right way to do this. I expected some
kind of special tag that I'll call "getprop":
<p>Str1 : <html:getprop property="str1"></p>
<p>Str2 : <html:getprop property="str2"></p>
What is the right way to do this?