Myeclipse 调试动态jsp页面出错调用hello类出错 (静态jsp可以显示)。
请教一问题啊。
单独静态jsp 页面 可以调试成功:index.jsp上显示 This is a jsp page.
但是如果jsp 页面上调用写的一个 hello类,就提示错误:
org.apache.jasper.JasperException: jsp:getProperty for bean with name 'hello'. Name was not previously introduced as per JSP.5.3
org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.java:1052)
我的 hello 类很简单啊 :
package com.test.bean;
public class Hello {
private String message = "Hello World";
public String getMessage()
{ return message;}
public void setMessage(String message)
{ this.message = message;}
}
index.jsp 页面就比默认的多补一行:
<body>
This is my JSP page. <br>
<jsp:getProperty name="hello" property="message" /><br> This is my new JSP page. <br>
</body>