(1)result是一个String;
<html:text property="String" name="searchForm" />(2)result是一个boolean
<html:radio property="boolean" value="0" name="searchForm" />
<html:radio property="boolean" value="1" name="searchForm" />(4)result是一 这个有点不明白了,只要是个变量这个都可以<html:text property="String" name="searchForm" />

解决方案 »

  1.   

    无论是变量,对象,或是集合,在action中用request.setAttribute("key",保存的内容的名字);
    在显示页面:如果是变量可以直接<%=request.getAttribute("key")%>
               如果是对象可以用<bean:write name="key",property="属性名",scope="request"/>
               如果是集合可用<logic:iterator id="element",name="key",scope="request">进行遍历
      

  2.   

    不好意思,发表问题的时候,没有进行格式化一下,呵呵。
    ===================================================
    问题:在执行完一个操作之后,jsp页面需要接受formbean返回回来的执行结果确认值,在jsp页面里怎么接受这个值呢?
    比如,返回的变量是result:(1)result是一个String;(2)result是一个boolean(3)result是一个List(4)result是一个Array;这四种情况,Jsp是怎么处理的呢?
    注:我问的是jsp页面中用标记库如何接受处理。
    ===================================================
    第一种情况(未解决):第二种情况(未解决):第三种情况(已经解决,如下):
    <logic:present name="searchForm" property="results">
      <hr width="100%" size="1" noshade="noshade"/>
      <bean:size id="size" name="searchForm" property="results"/>
      <logic:equal value="0" name="size">
        <center><font color="red"><b>No Employees Found</b></font>
        </center>
      </logic:equal>
      <logic:greaterThan value="0" name="size">
        <table border="1">
          <tr>
            <th>Name</th>
            <th>Social Security Number</th>
          </tr>
          <logic:iterate id="result" name="searchForm" property="results">
            <tr>
              <td><bean:write name="result" property="name"/></td>
              <td><bean:write name="result" property="ssNum"/></td>
            </tr>
          </logic:iterate>
        </table>
      </logic:greaterThan>
      </logic:present>第四种情况(未解决):
      

  3.   

    如果返回的是一个逻辑值,在jsp页面中,怎么判断它是true或者是false呢?
    如果返回值是一个字符串,在jsp页面中,又怎么判断它就是指定的那个字符串呢?
    这两种情况可不能用if...else...哦(:
    用标记库怎么实现判断功能?