windows2000 server+tomcat4.1.27+jdk1.4.0+javabean+jsp+sql server2000如何配置文件??在线问题!
1.我安装好所有软件后配置所有的文件后把jsp文件放在C:\Tomcat 4.1\webapps\ROOT运行访问数据库成功,
2.我把doit.class和mydb.class 的javabean文件放在C:\Tomcat 4.1\webapps\ROOT\WEB-INF\classes\dbcon目录下。
3.我没有改过tomcat里的文,件(包括C:\Tomcat 4.1\webapps\ROOT\WEB-INF\web.xml问件,现在web.xml文件内容如下:
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<display-name>Welcome to Tomcat</display-name>
<description>
Welcome to Tomcat
</description>
</web-app>
)没有该动
4.我运行出错误如下:
org.apache.jasper.JasperException: Unable to compile class for JSP
An error occurred at line: 21 in the jsp file: /login.jsp
Generated servlet error:
[javac] Compiling 1 source file
C:\Tomcat 4.1\work\Standalone\localhost\_\login_jsp.java:65: package dbcon does not exist
dbcon.mydb DB = null;
^
An error occurred at line: 21 in the jsp file: /login.jsp
Generated servlet error:
C:\Tomcat 4.1\work\Standalone\localhost\_\login_jsp.java:67: package dbcon does not exist
DB = (dbcon.mydb) pageContext.getAttribute("DB", PageContext.PAGE_SCOPE);
^
An error occurred at line: 21 in the jsp file: /login.jsp
Generated servlet error:
C:\Tomcat 4.1\work\Standalone\localhost\_\login_jsp.java:70: package dbcon does not exist
DB = (dbcon.mydb) java.beans.Beans.instantiate(this.getClass().getClassLoader(), "dbcon.mydb");
^
An error occurred at line: 22 in the jsp file: /login.jsp
Generated servlet error:
C:\Tomcat 4.1\work\Standalone\localhost\_\login_jsp.java:80: package dbcon does not exist
dbcon.doit doit = null;
^
An error occurred at line: 22 in the jsp file: /login.jsp
Generated servlet error:
C:\Tomcat 4.1\work\Standalone\localhost\_\login_jsp.java:82: package dbcon does not exist
doit = (dbcon.doit) pageContext.getAttribute("doit", PageContext.PAGE_SCOPE);
^
An error occurred at line: 22 in the jsp file: /login.jsp
Generated servlet error:
C:\Tomcat 4.1\work\Standalone\localhost\_\login_jsp.java:85: package dbcon does not exist
doit = (dbcon.doit) java.beans.Beans.instantiate(this.getClass().getClassLoader(), "dbcon.doit");
^
6 errors
大家来帮帮我!谢谢!!