一个关于struts标签的小问题~~~~
我想实现的功能是,用户通过下拉列表选择用户id进行检索,提交到action,我把检索条件在action里用request.setAttrubute( "id ",id)存起来。返回检索结果后,希望下拉列表还能显示用户选择的结果,比如他选择了id=5,检索回来,出现了id为5的用户的详细信息,并且下拉列表的检索条件选择的还是5   
 我是这么实现的   
  <select   name= "users "   style= "width:100pt ">  
                         	 <option   value= " ">  </option>  
                         	 <logic:notEmpty   name= "userList ">  
                         		 <logic:iterate   id= "UL "   name= "userList ">  
                         			 <option   value= " <bean:write   name= "UL "   property= "userId "/>  "    <logic:equal      name= "id "   value= " <bean:write   name= "UL "   property= "userId "/>  "> selected= "selected " </logic:equal> >  <bean:write   name= "UL "   property= "userId "   />  </option>  
                         		 </logic:iterate>  
                         	 </logic:notEmpty>  
                          </select>    
 主要是这行 <logic:equal      name= "id "   value= " <bean:write   name= "UL "   property= "userId "/>  "> selected= "selected " </logic:equal> 有错误   
 说是
org.apache.jasper.JasperException:   /JspPages/employee/searchEmployee.jsp(60,130)   equal   symbol   expected   
 我感觉是标签嵌套的问题,这样用应该是没有错的……因为value后面不跟 <bean:write> 的话类似功能就可以实现。
------解决方案--------------------既然你用标签了,怎么不把select 和option 也用struts标签?   
 那样就不简单多了。   
  <html:select property= "statusId " style= "width:150; ">  
    <html:option value= "0 "> 请选择审核状态 </html:option>  
    <html:optionsCollection name= "statusList " value= "statusid " label= "statusname " />  
  </html:select>    
 statusID在formBean里面定义。 
 statusList是数据库里面搜索出来的。   
 你上面所的功能 只需要把值set给Form里面的Id就可以实现你的功能了