部分代码如下(StudentManager是测试程序项目名称,程序在StudentManager\WEB-INF\classes\com\ydh目录下):
package com.ydh;
错误①"the character '-' in the name of this file cannot appear in the java identifier."import java.io.*;
import java.sql.*;
public class sqlconn
错误②"the package of this type does not match its location on the source
path:WEB.classes.com.ydh."{
.......
}testSQL.jsp引用代码(testSQL.jsp程序在StudentManager\目录下)如下:
<jsp:useBean id="dbBean" scope="page" class="com.ydh.sqlconn"/>
错误③Type com.ydh.sqlconn contains no methods with this name.
package com.ydh;
错误①"the character '-' in the name of this file cannot appear in the java identifier."import java.io.*;
import java.sql.*;
public class sqlconn
错误②"the package of this type does not match its location on the source
path:WEB.classes.com.ydh."{
.......
}testSQL.jsp引用代码(testSQL.jsp程序在StudentManager\目录下)如下:
<jsp:useBean id="dbBean" scope="page" class="com.ydh.sqlconn"/>
错误③Type com.ydh.sqlconn contains no methods with this name.
解决方案 »
- 类内方法外new 对象语句是如何被执行的?
- JTextField添加释放键盘事件
- 请哪位大侠帮忙看看,写拉一天代码,然后测试一个很简单的java类,出现下面的异常,急呀
- 怎样做一个不受系统时间影响的定时程序?
- 请问怎么用java访问局域网内的其他机器上的mysql数据库?
- 请问jsp页面中有没有destory()调用?
- 请问GridBagConstraints(有源码)
- 在线等,看我错在哪里了,谢谢!!!!急急急!!!
- 可以成立个结贴委员会!!!
- 我的jbuilder5注册号,密码等都完成了,但我进入jb5的环境时无法看见代码,就是怎么做也看不到代码,这样我就无法编辑,请问该如何解决?
- SWT中画图canvas后怎么生成JPEG图像啊?求救!
- 分数有什么用,怎么查看自己有多少分?
第二个是说包的位置不匹配,没有在src目录下
第三个是说名字为com.ydh.sqlconn的类中没有方法,既然是jsp:useBean,那么在bean类中是否存在对应的set/get方法