description The server encountered an internal error () that prevented it from fulfilling this request
这句大概的是说你的文件也就是你的程序出现了内部的错误了
java.lang.ClassNotFoundException: bean.samplebean
这个好象就是说你的BEAN写的可能有错误了这种错误报的很多了,一般的就是你的页面上自己粗心出现的错误了,仔细点
应该没有问题的了
这句大概的是说你的文件也就是你的程序出现了内部的错误了
java.lang.ClassNotFoundException: bean.samplebean
这个好象就是说你的BEAN写的可能有错误了这种错误报的很多了,一般的就是你的页面上自己粗心出现的错误了,仔细点
应该没有问题的了
解决方案 »
- 为什么编辑器提交表单,内容是oracle.sql.CLOB@ebd4ee
- Eclipse/Lomboz 装 Properties Editor 插件为什么没用?
- A pseudo attribute name is expected问题
- 高手请进,问一个关于JSP提示控件的问题。
- 一个表单密码验证问题
- 急求,文章点击率的问题!!!
- Can not issue empty query郁闷到何时啊?请进,谢
- java中出错信息
- 为什么我用ResultSet的last(),absolute()方法时抱错???
- 急:weblogic5.1的问题。
- jsp中能实现这种功能吗?
- 求助!!!WEB页面上的树型菜单问题!
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"' target="_blank" >http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>sample1</title>
</head>
<jsp:useBean id="samplebeanId" scope="session" class="bean.samplebean"/>
<jsp:setProperty name="samplebeanId" property="*"/>
<body>
<h1> A JSP & Bean Sample</h1>
<form method="post">
<br>Enter new value:<input name="sample"><br>
<br><br>
<input type="submit" name="Submit" value="Submit">
<input type="reset" value="Reset">
<br>
Value of Bean property is:<jsp:getProperty name="samplebeanId" property="sample"/>
</form>
</body>
</html>----------------------------------------------------------------------samplebean.class在文件夹bean下,samplebean.java的内容:package bean;
public class samplebean{
private String sample="start value";
public String getSample(){
return sample;
}
public void setSample(String newValue){
if(newValue!=null){
sample=newValue;
}
}
}
我看了半天没看出来有什么错误,谁能帮忙指点下!!!谢谢
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;public class servlet extends HttpServlet { protected void doPost(
HttpServletRequest request,
HttpServletResponse response)
throws ServletException, IOException { samplebean bean = new samplebean();
bean.sample = "That`s ok";
//****************************************************************************
//如果jsp上写的是scope="request",那么就用这段
request.setAttribute("samplebeanId", bean);
//****************************************************************************
//如果jsp上写的是scope="session",那么就用这段
HttpSession s = request.getSession();
s.setAttribute("samplebeanId", bean);
//****************************************************************************
request.getRequestDispatcher("/sample1.jsp").forward(request,response);
}
}