jsp实现网络教育系统
源代码在线查看: categorylisttag.java
package org.jetic.web.soft; import org.jetic.web.*; /** * Title: 经天科技 * Description: * Copyright: Copyright (c) 2001 * Company: www.jetic.org 经天 * @author hover * @version 1.0 */ public class CategoryListTag extends TagBase { Category category = new Category(); private int groupID = 0; public CategoryListTag() { super(); setChildTag(this); setDbo(category); } public void init() { try { String sql = "SELECT [ID], groups, [name], [description] FROM soft_category"; if (groupID > 0) sql += " WHERE groups = " + groupID; sql += " ORDER BY [ID]"; DBConnect conn = new DBConnect(sql); rs = conn.executeQuery(); } catch (Exception ex) { ex.printStackTrace(System.err); } } public int getGroupID() { return groupID; } public void setGroupID(int newGroupID) { groupID = newGroupID; } }