org.apache.jasper.JasperException:无法编译JSP类:
行发生的一个错误:在JSP文件中16 / look.jsp
方法名()未定义类型controlnews
13: controlnews cn = new controlnews();
14:
15:
16: String info = cn.name();
17:
18: out.print(info);
19: %>
java包中的东西
package org.jbit.news.bean;
public class controlnews {
public String name(){
String name ="a";
return name;
}
}
------解决方案--------------------------------------------------------
controlnews import到jsp页面上没?
------解决方案--------------------------------------------------------
<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*,org.jbit.news.bean.controlnews" errorPage="" %>
把引入的包在上面写 试一试