用 s:select 试试:
<s:select name="user.sex" list="#{'0':'男','1':'女'}" label="性别" headerKey="" headerValue="请选择性别"></s:select> 

解决方案 »

  1.   

    package com.lyq.struts.action
    public ActionForward add(ActionMapping mapping, ActionForm form,
    HttpServletRequest request, HttpServletResponse response)
    throws Exception {
    Info med = null;
    InfoForm df = (InfoForm) form;
    InfoDao dao = new InfoDao();

    med = new Info();
    BeanUtils.copyProperties(med, df);
    CategoryDao cd = new CategoryDao();
    List list = cd.findByHQL("from Category");
    request.setAttribute("cs", list);
    Category category = cd.loadCategory(df.getCategoryId());
    med.setCategory(category);
    dao.saveOrUpdate(med);
    return mapping.findForward("addSuccess");
    }
    jsp页面引用如下:
    <%@ page import="com.lyq.struts.action.InfoAction" %>
    不知哪里有问题?
      

  2.   

    既然都使用struts 干嘛不适用struts 标签库? 
    楼上已经给出答案了 你这样写  页面代码不美观