<%@ page language="java" contentType="text/html;charset=GBK"%><%@ page contentType="text/html;charset=GBK"%>
<%@ page import="java.util.HashMap"%>
<%@ page import="java.io.IOException"%>
<%@ page import="cn.com.chx.bo.AppBo"%>
<%@ page import="java.lang.String.*"%>
<%@ page import="cn.com.chx.util.Login"%>
<%@ page import="java.lang.String.*"%>
<%@ page import="java.util.*"%>
<%@page import="Count"%>
<%@page import="Count"%>
<%@ taglib uri="/websitetag" prefix="websitetag"%>
<%@ page import="java.text.SimpleDateFormat"%>
<%@ page import="cn.com.chx.bo.AppBo"%>
<%
class Count {
String getNum(int posttype) {
AppBo aB = new AppBo();
ArrayList ls = new ArrayList(); try {
String sql = "select count(1) as CNT from ou_user where posttype = '" + posttype +"'";
System.out.println("sql:" + sql);
ls = aB.query(sql);
//System.out.println(ls.size());
HashMap map0 = (HashMap) ls.get(0);
String count = (String) map0.get("CNT");
System.out.println("CNT:" + count);
if ((!count.equals("0")) && (ls.size() > 0)) {
return count;
} else {
return "not found";
}
} catch (Exception e) { }
}
}
%>
<%
Count count = new Count();
%>错误提示:org.apache.jasper.JasperException: Unable to compile class for JSPAn error occurred at line: -1 in the jsp file: nullGenerated servlet error:
[javac] Compiling 1 source fileF:\MyJob\aceway\software\jboss.4.2.3.SP\server\default\work\jboss.web\localhost\_\org\apache\jsp\gaitu\_11_jsp.java:13: 需要 '.'
import Count;
^
F:\MyJob\aceway\software\jboss.4.2.3.SP\server\default\work\jboss.web\localhost\_\org\apache\jsp\gaitu\_11_jsp.java:13: 需要 ';'
import Count;
^
F:\MyJob\aceway\software\jboss.4.2.3.SP\server\default\work\jboss.web\localhost\_\org\apache\jsp\gaitu\_11_jsp.java:14: 需要为 class、interface 或 enum
import Count;
^
3 错误怎么搞定?
<%@ page import="java.util.HashMap"%>
<%@ page import="java.io.IOException"%>
<%@ page import="cn.com.chx.bo.AppBo"%>
<%@ page import="java.lang.String.*"%>
<%@ page import="cn.com.chx.util.Login"%>
<%@ page import="java.lang.String.*"%>
<%@ page import="java.util.*"%>
<%@page import="Count"%>
<%@page import="Count"%>
<%@ taglib uri="/websitetag" prefix="websitetag"%>
<%@ page import="java.text.SimpleDateFormat"%>
<%@ page import="cn.com.chx.bo.AppBo"%>
<%
class Count {
String getNum(int posttype) {
AppBo aB = new AppBo();
ArrayList ls = new ArrayList(); try {
String sql = "select count(1) as CNT from ou_user where posttype = '" + posttype +"'";
System.out.println("sql:" + sql);
ls = aB.query(sql);
//System.out.println(ls.size());
HashMap map0 = (HashMap) ls.get(0);
String count = (String) map0.get("CNT");
System.out.println("CNT:" + count);
if ((!count.equals("0")) && (ls.size() > 0)) {
return count;
} else {
return "not found";
}
} catch (Exception e) { }
}
}
%>
<%
Count count = new Count();
%>错误提示:org.apache.jasper.JasperException: Unable to compile class for JSPAn error occurred at line: -1 in the jsp file: nullGenerated servlet error:
[javac] Compiling 1 source fileF:\MyJob\aceway\software\jboss.4.2.3.SP\server\default\work\jboss.web\localhost\_\org\apache\jsp\gaitu\_11_jsp.java:13: 需要 '.'
import Count;
^
F:\MyJob\aceway\software\jboss.4.2.3.SP\server\default\work\jboss.web\localhost\_\org\apache\jsp\gaitu\_11_jsp.java:13: 需要 ';'
import Count;
^
F:\MyJob\aceway\software\jboss.4.2.3.SP\server\default\work\jboss.web\localhost\_\org\apache\jsp\gaitu\_11_jsp.java:14: 需要为 class、interface 或 enum
import Count;
^
3 错误怎么搞定?
自己封装的jdbc?????,不过你代码还是用csdn的工具把代码整理下!这看着累·
什么东东?
class Count {
String getNum(int posttype) {
AppBo aB = new AppBo();
ArrayList ls = new ArrayList();try {
................