这里的写法是错误的。<html:text property="burName" value="<bean:write name="bur" property="bureauName" />" />标签中,是不能含有另一个标签的。
<html:text>是个标签。 <bean:write>也是个标签。 
所以,这样用的话,编译JSP的时候会出错。楼主可以试一下,把上面改写成:
<%
    String burName=(String)session.getAttribute("burName");
%>
<html:text property="burName" value="<%=burName%>" />应该是可以的。
但是在某些情况下,<%= %>也不能包含在自定义标签中,例如FCKEditor的<fck:editor>标签就不行。有一种情况是肯定可以的:就是,基本的HTML标签中,都可以插入JSP标签,呵呵

解决方案 »

  1.   

    其實struts標簽是不能夠嵌套的;
    例一:<logic:iterate   id="cl"   name="Ids">   //循环取得id   
                 //比较beanname中的id是否和cl中的id相同,如果相同就显示cl中的name      
                  <logic:equal   name="beanname"   property="id"   value="<bean:write   name="cl"   property="id"/>">      
                      <bean:write   name="cl"   property="name"/>   
                  </logic:equal>   
            </logic:iterate>  
            紅色文字區就是錯誤的嵌套了,這樣是得不到想要的結果的,可改爲
            <logic:iterate   id="cl"   name="Ids">   //循环取得id   
                  <bean:define   id="temId"   name="cl"   property="id"   type="temId.toString()"/>   
                  //比较beanname中的id是否和cl中的id相同,如果相同就显示cl中的name
                  <logic:equal   name="beanname"   property="id"   value="<%=temId%>">      
                        <bean:write   name="cl"   property="name"/>   
                  </logic:equal>   
            </logic:iterate>   
            這樣先定義,后使用,就ok了。
    例二:<html:submit   value="<bean:message   key="welcome.login"   bundle="base"/>"/> 
             應該為
             <html:submit>   
                  <bean:message   key     =   "welcome.logon"   bundle   =   "base"/>   
             </html:submit>
    -----------------------------------------------------
    给你个参考..
      

  2.   

    sg552(:)) 可以用.
    但我有一个html:select标签.
    如何设置html:select默认选某一项.jicken_woo先定義,后使用.学了一招.
      

  3.   

    bean:write应该能够从session里找的,如果还不行有一个很简单的办法,就是在jsk开始:
    request.setAttribute("bur", session.getAttribute("bur"));
    就能够找到了<bean:write name="bur"/>
      

  4.   

    用EL表达式最方便了
    <html:text property="burName" value="${bur}" />
    完事,不行你咬我
      

  5.   

    <logic:present name="burs">
    <logic:iterate id="burId" name="burs"
    type="hibernate.UBureau"> <html:option value="我这里要填burs的property:burId">
    <bean:write name="burId" property="bureauName" />
    </html:option> </logic:iterate>
    </logic:present>
    ****************************************************
    <html:option value="">
    value里想填burId,怎么做?
      

  6.   

    jicken_woo(黑夜里你留下的轮廓,指引我-------不寂寞---------------) 
    按你的意思,改成这样
    <html:select property="burId">
    <logic:present name="burs">
    <logic:iterate id="id" name="burs"
    type="hibernate.UBureau">
    <bean:define id="temId" name="id" property="burId"
    type="temId.toString()">
    <html:option value="<%=temId %>">
    <bean:write name="id" property="bureauName" />
    </html:option>
        </bean:define>
    </logic:iterate>
    </logic:present>
    </html:select>出错.
    org.apache.jasper.JasperException: Unable to compile class for JSPGenerated servlet error:
    Syntax error, insert ";" to complete Statement很奇怪额.