这段错误提示是什么意思啊. 程序代码有错误net.jspcn.db.DbConnect.executeQuery(DbConnect.java:113)//这可能有问题 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 呵呵,明显错误是在这里:org.apache.jsp.index_jsp._jspService(index_jsp.java:139)你在JSP中某个地方使用了一个空对象,所以会报这个错。如果直接在JSP中找错误,可能不是很好找,如果你能在服务器目录下找到 index_jsp.java 这个文件,找错就好找多了。 tojamesfancy()边城狂人(James Fancy) :我把index_jsp.java贴上来了,第139行是"rs = index_man.executeQuery(sql);"你可以用搜索定位.如果不方便看就算了.package org.apache.jsp;import javax.servlet.*;import javax.servlet.http.*;import javax.servlet.jsp.*;import java.sql.*;import java.io.*;import java.util.*;public final class index_jsp extends org.apache.jasper.runtime.HttpJspBase implements org.apache.jasper.runtime.JspSourceDependent { private static java.util.Vector _jspx_dependants; static { _jspx_dependants = new java.util.Vector(4); _jspx_dependants.add("/function/parameter.jsp"); _jspx_dependants.add("/function/header1.jsp"); _jspx_dependants.add("/function/header2.jsp"); _jspx_dependants.add("/function/feeder.jsp"); } public java.util.List getDependants() { return _jspx_dependants; } public void _jspService(HttpServletRequest request, HttpServletResponse response) throws java.io.IOException, ServletException { JspFactory _jspxFactory = null; PageContext pageContext = null; HttpSession session = null; ServletContext application = null; ServletConfig config = null; JspWriter out = null; Object page = this; JspWriter _jspx_out = null; PageContext _jspx_page_context = null; try { _jspxFactory = JspFactory.getDefaultFactory(); response.setContentType("text/html; charset=GB2312"); pageContext = _jspxFactory.getPageContext(this, request, response, null, true, 8192, true); _jspx_page_context = pageContext; application = pageContext.getServletContext(); config = pageContext.getServletConfig(); session = pageContext.getSession(); out = pageContext.getOut(); _jspx_out = out; out.write("<!-- whilvydy news release system -->\r\n"); out.write("\r\n"); out.write("\r\n"); out.write(" \r\n"); out.write("\r\n");String user_table = "wh_user";String type_table = "wh_type";String board_table = "wh_board";String news_table = "wh_news";String newsdetail_table = "wh_newsdetail";String keyword_table = "wh_keyword";String review_table = "wh_review";String logrecord_table = "wh_logrecord";String[] msg = new String[5]; msg[0] = "脰脨脦脛脥酶 FOR 虏芒脢脭"; //main web title in index.jsp msg[1] = "D:\\users\\jspcn.net\\"; //戮酶露脭脗路戮露 int[] param = new int[10]; param[0]=4; //define the news display number in index.jsp param[1]=13; //news title length in index.jsp param[2]=15; //intPageSize in boarddetail.jsp param[3]=15; //page size in search.jspboolean[] flag = new boolean[5]; flag[0] = true; //display related news flag[1] = true; //驴脡脪脭脝脌脗脹 out.write("\r\n"); out.write("\r\n"); net.jspcn.db.DbConnect index_man = null; synchronized (_jspx_page_context) { index_man = (net.jspcn.db.DbConnect) _jspx_page_context.getAttribute("index_man", PageContext.PAGE_SCOPE); if (index_man == null){ index_man = new net.jspcn.db.DbConnect(); _jspx_page_context.setAttribute("index_man", index_man, PageContext.PAGE_SCOPE); } } out.write('\r'); out.write('\n'); net.jspcn.tool.StringProcess StrTool = null; synchronized (_jspx_page_context) { StrTool = (net.jspcn.tool.StringProcess) _jspx_page_context.getAttribute("StrTool", PageContext.PAGE_SCOPE); if (StrTool == null){ StrTool = new net.jspcn.tool.StringProcess(); _jspx_page_context.setAttribute("StrTool", StrTool, PageContext.PAGE_SCOPE); } } out.write('\r'); out.write('\n'); net.jspcn.util.counter counter = null; synchronized (request) { counter = (net.jspcn.util.counter) _jspx_page_context.getAttribute("counter", PageContext.REQUEST_SCOPE); if (counter == null){ counter = new net.jspcn.util.counter(); _jspx_page_context.setAttribute("counter", counter, PageContext.REQUEST_SCOPE); } } out.write("\r\n"); out.write("\r\n");///////////////////////// the varity init */int intDisplay,newslength;int giveType_id = 2;intDisplay = param[0];newslength = param[1];String htmltitle;htmltitle = msg[0];index_man.openConnection();String sql,sql1,userWealth;userWealth="";ResultSet rs,rs1;//String cont=counter.ReadFile(msg[1]+"count.txt");//counter.WriteFile(msg[1]+"count.txt",cont);///////////////////* 寰楀埌妯洰褰?String[] vtitle = new String[10];String[] vlink = new String[10];int vtitle_count = 0;sql = "select * from "+type_table+" where type_audit=1 and type_id<>1";rs = index_man.executeQuery(sql);while(rs.next()) { vtitle[vtitle_count] = rs.getString("type_name"); vlink[vtitle_count] = rs.getString("type_id"); vtitle_count++;}帖子太长了,帖不下.我做一个链接在下面你看看. http://yourhome.arkoo.com/lilao/index_jsp.java从这可以下载到index_jsp.java的完整版本 1.在mysql数据库中建立数据库:jspcndb2.将whilvydy.sql导入到数据库jspcndb中 导入whilvydy.sql脚本 命令如下: \. d:\users\dy\whilvydy.sql3.将news1.0.rar 解压在您的tomcat或resin的app-dir目录下(服务目录下)4.将news1.0/web-inf/*拷贝到您的web-inf下5.修改/web-inf/classes/net/jspcn/db/db_index.txt中的数据库连接信息(你的数据库的用户名和密码)上面的问题分送不出去,只好再开一问了.上面的第3条说解压在您的tomcat或resin的app-dir目录下(服务目录下)我就把它解压到root下面了,可是就出现了楼顶的错误.说解压到app-dir 我根本就没发现有这个个目录.(服务目录缺省不就是ROOT吗?) JS问题 请高手帮忙 比较急 对IFrame,如何使mapping.findForward指向的页面成为当前主页面? struts2的下拉框选项问题 java.lang.NumberFormatException: For input string: "" 这个问题如何解决?? ajax 同步 jsf1.2 包 请教教小弟:读取 txt文件,并插到数据库!!! JSP查找后发送结果问题 web应用程序的运行问题 web.xml的配置问题 Jsp分割字串并放入数组的问题 求一个好用JSP开发工具~
org.apache.jsp.index_jsp._jspService(index_jsp.java:139)
你在JSP中某个地方使用了一个空对象,所以会报这个错。
如果直接在JSP中找错误,可能不是很好找,如果你能在服务器目录下找到 index_jsp.java 这个文件,找错就好找多了。
我把index_jsp.java贴上来了,第139行是"rs = index_man.executeQuery(sql);"你可以用搜索定位.
如果不方便看就算了.package org.apache.jsp;import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import java.sql.*;
import java.io.*;
import java.util.*;public final class index_jsp extends org.apache.jasper.runtime.HttpJspBase
implements org.apache.jasper.runtime.JspSourceDependent { private static java.util.Vector _jspx_dependants; static {
_jspx_dependants = new java.util.Vector(4);
_jspx_dependants.add("/function/parameter.jsp");
_jspx_dependants.add("/function/header1.jsp");
_jspx_dependants.add("/function/header2.jsp");
_jspx_dependants.add("/function/feeder.jsp");
} public java.util.List getDependants() {
return _jspx_dependants;
} public void _jspService(HttpServletRequest request, HttpServletResponse response)
throws java.io.IOException, ServletException { JspFactory _jspxFactory = null;
PageContext pageContext = null;
HttpSession session = null;
ServletContext application = null;
ServletConfig config = null;
JspWriter out = null;
Object page = this;
JspWriter _jspx_out = null;
PageContext _jspx_page_context = null;
try {
_jspxFactory = JspFactory.getDefaultFactory();
response.setContentType("text/html; charset=GB2312");
pageContext = _jspxFactory.getPageContext(this, request, response,
null, true, 8192, true);
_jspx_page_context = pageContext;
application = pageContext.getServletContext();
config = pageContext.getServletConfig();
session = pageContext.getSession();
out = pageContext.getOut();
_jspx_out = out; out.write("<!-- whilvydy news release system -->\r\n");
out.write("\r\n");
out.write("\r\n");
out.write(" \r\n");
out.write("\r\n");String user_table = "wh_user";
String type_table = "wh_type";
String board_table = "wh_board";
String news_table = "wh_news";
String newsdetail_table = "wh_newsdetail";
String keyword_table = "wh_keyword";
String review_table = "wh_review";
String logrecord_table = "wh_logrecord";
String[] msg = new String[5];
msg[0] = "脰脨脦脛脥酶 FOR 虏芒脢脭"; //main web title in index.jsp
msg[1] = "D:\\users\\jspcn.net\\"; //戮酶露脭脗路戮露
int[] param = new int[10];
param[0]=4; //define the news display number in index.jsp
param[1]=13; //news title length in index.jsp
param[2]=15; //intPageSize in boarddetail.jsp
param[3]=15; //page size in search.jspboolean[] flag = new boolean[5];
flag[0] = true; //display related news
flag[1] = true; //驴脡脪脭脝脌脗脹
out.write("\r\n");
out.write("\r\n");
net.jspcn.db.DbConnect index_man = null;
synchronized (_jspx_page_context) {
index_man = (net.jspcn.db.DbConnect) _jspx_page_context.getAttribute("index_man", PageContext.PAGE_SCOPE);
if (index_man == null){
index_man = new net.jspcn.db.DbConnect();
_jspx_page_context.setAttribute("index_man", index_man, PageContext.PAGE_SCOPE);
}
}
out.write('\r');
out.write('\n');
net.jspcn.tool.StringProcess StrTool = null;
synchronized (_jspx_page_context) {
StrTool = (net.jspcn.tool.StringProcess) _jspx_page_context.getAttribute("StrTool", PageContext.PAGE_SCOPE);
if (StrTool == null){
StrTool = new net.jspcn.tool.StringProcess();
_jspx_page_context.setAttribute("StrTool", StrTool, PageContext.PAGE_SCOPE);
}
}
out.write('\r');
out.write('\n');
net.jspcn.util.counter counter = null;
synchronized (request) {
counter = (net.jspcn.util.counter) _jspx_page_context.getAttribute("counter", PageContext.REQUEST_SCOPE);
if (counter == null){
counter = new net.jspcn.util.counter();
_jspx_page_context.setAttribute("counter", counter, PageContext.REQUEST_SCOPE);
}
}
out.write("\r\n");
out.write("\r\n");///////////////////////// the varity init */
int intDisplay,newslength;
int giveType_id = 2;
intDisplay = param[0];
newslength = param[1];
String htmltitle;
htmltitle = msg[0];index_man.openConnection();
String sql,sql1,userWealth;
userWealth="";
ResultSet rs,rs1;
//String cont=counter.ReadFile(msg[1]+"count.txt");
//counter.WriteFile(msg[1]+"count.txt",cont);///////////////////* 寰楀埌妯洰褰?
String[] vtitle = new String[10];
String[] vlink = new String[10];
int vtitle_count = 0;
sql = "select * from "+type_table+" where type_audit=1 and type_id<>1";
rs = index_man.executeQuery(sql);while(rs.next()) {
vtitle[vtitle_count] = rs.getString("type_name");
vlink[vtitle_count] = rs.getString("type_id");
vtitle_count++;
}帖子太长了,帖不下.我做一个链接在下面你看看.
2.将whilvydy.sql导入到数据库jspcndb中
导入whilvydy.sql脚本
命令如下:
\. d:\users\dy\whilvydy.sql
3.将news1.0.rar 解压在您的tomcat或resin的app-dir目录下(服务目录下)
4.将news1.0/web-inf/*拷贝到您的web-inf下
5.修改/web-inf/classes/net/jspcn/db/db_index.txt中的数据库连接信息(你的数据库的用户名和密码)
上面的问题分送不出去,只好再开一问了.
上面的第3条说解压在您的tomcat或resin的app-dir目录下(服务目录下)我就把它解压到root下面了,可是就出现了楼顶的错误.说解压到app-dir 我根本就没发现有这个个目录.(服务目录缺省不就是ROOT吗?)