当前页面: 开发资料首页 → JSP 专题 → Bean调用不了,请进来看看
Bean调用不了,请进来看看
摘要: Bean调用不了,请进来看看
在jsp页面中,调用了bean,但是打开页面时,没有任何显示,在tomcat中报出警告信息如下:
2006-10-1 9:25:20 org.apache.jasper.runtime.PageContextImpl release
警告: Internal error flushing the buffer in release()
开发环境:myeclipse3,2+tomcat5。5+jdk1。5
这是书上的代码,但是,不知道怎么才能调用出来。
bean在jdk中编译,没有出错。
jsp页面代码:
<%@ page language="java" contentType="text/html; charset=BGK" pageEncoding="GBK"%>
<%@ page import = "bean.*" %>
<head>
使用</head>
<body bground = "gray">
调用前
调用后
</body>
bean代码:
package bean;
public class SampleBean {
public String sample = null;
public String getsample(){
return sample;
}
public void setsample(String newsample){
if(newsample != null){
sample = newsample;
}
}
}
有详细的出错信息吗?
你在servlet中调用request.setAttribute()了吗?
我个人理解改为:
charset=BGK" pageEncoding="GBK"%>
?????????
不知道跟这个有关没?