Error???

luyuanzhong 2004-01-06 02:11:06
--------------------------------------------------------------------------------
我用jbuilder编译出现以下错误的原因在哪?如何解决
java.lang.NullPointerException
--------------- nested within: ------------------
"index.jsp": weblogic.utils.AssertionError: ***** ASSERTION FAILED ***** - with nested exception:
[java.lang.NullPointerException]
java.lang.NullPointerException
--------------- nested within: ------------------


indexbean.java文件:

package tds;

/**
* <p>Title: </p>
* <p>Description: </p>
* <p>Copyright: Copyright (c) 2004</p>
* <p>Company: </p>
* @author not attributable
* @version 1.0
*/

public class IndexBean {
private String sample = "Start value";
//Access sample property
public String getSample() {
return sample;
}

//Access sample property
public void setSample(String newValue) {
if (newValue != null) {
sample = newValue;
}
else {
sample = "Start value";
}
}
}

index.jsp文件:
<%@ page contentType="text/html; charset=GBK" %>
<html>
<head>
<title>
index
</title>
</head>
<jsp:useBean id="indexBeanId" scope="session" class="tds.IndexBean" />
<jsp:setProperty name="indexBeanId" property="*" />
<body bgcolor="#ffffff">
<h1>
JBuilder Generated JSP
</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="indexBeanId" property="sample" />
</form>
</body>
</html>



...全文
28 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

67,513

社区成员

发帖
与我相关
我的任务
社区描述
J2EE只是Java企业应用。我们需要一个跨J2SE/WEB/EJB的微容器,保护我们的业务核心组件(中间件),以延续它的生命力,而不是依赖J2SE/J2EE版本。
社区管理员
  • Java EE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧