当前位置: 技术问答>java相关
jsp tag的问题
来源: 互联网 发布时间:2015-01-21
本文导语: 在Category.jsp里面有: taglib prefix="mt" uri="/WEB-INF/software.xml 在software.xml里面有 CategoryList org.jetic.web.soft.CategoryListTag org.jetic.web.soft.CategoryListTagExtraInfo CategoryListTab.class也在orgjeticwebsoft路径下 ...
在Category.jsp里面有:
taglib prefix="mt" uri="/WEB-INF/software.xml
在software.xml里面有
CategoryList
org.jetic.web.soft.CategoryListTag
org.jetic.web.soft.CategoryListTagExtraInfo
CategoryListTab.class也在orgjeticwebsoft路径下
怎么还报错?The attribute 'groupID' for custom tag 'CategoryList' on line '8' of page '/category.jsp' is not declared as an attribute for this tag, perhaps it should be added to the TLD.
为什么总是在jsp tag这上边出问题。
那个高手告知在下可能出现的问题?
或给我介绍一个能正常运行的jsp tab程序。
这是CategoryListTag.java
package org.jetic.web.soft;
import org.jetic.web.*;
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;
}
taglib prefix="mt" uri="/WEB-INF/software.xml
在software.xml里面有
CategoryList
org.jetic.web.soft.CategoryListTag
org.jetic.web.soft.CategoryListTagExtraInfo
CategoryListTab.class也在orgjeticwebsoft路径下
怎么还报错?The attribute 'groupID' for custom tag 'CategoryList' on line '8' of page '/category.jsp' is not declared as an attribute for this tag, perhaps it should be added to the TLD.
为什么总是在jsp tag这上边出问题。
那个高手告知在下可能出现的问题?
或给我介绍一个能正常运行的jsp tab程序。
这是CategoryListTag.java
package org.jetic.web.soft;
import org.jetic.web.*;
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;
}
|
灌水