JSP自定义select标签的取值
select取值是通过name属性获取。
自定义标签的流程:
1.继承JSP标签的标签类TagSupport,SimpleTagSupport等,重写dostart()或doTag()等方法;
public class DictTag extends TagSupport{ private static Log log = LogFactory.getLog(DictTag.class); private String dictType; //设置默认值 private String selectValue; private String id; private String name; private String htmlType; private static final long serialVersionUID = 1L; @Override public int doStartTag() throws JspException { try { String str = ""; if("select".equals(htmlType)){ str &