怎么回事?

来源:5-8 JavaBean四个作用域范围

努力GOGO

2015-11-29 22:50

    

<body>

  <jsp:useBean id="myUsers"class="com.po.Users"scope="application"/>

  <h1>setProperty动作元素</h1>

  <hr><jsp:setProperty property="password" name="myUsers" param="mypass"/>

  <jsp:setProperty property="username" name="myUsers" />

用户名:<jsp:getProperty property="username" name="myUsers"/><br>

密码:<jsp:getProperty property="password" name="myUsers"/><br>

  </body>

提示错误信息

HTTP Status 500 -

type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

org.apache.jasper.JasperException: file:/dologin.jsp(40,4) jsp:getProperty for bean with name 'myUsers'. Name was not previously introduced as per JSP.5.3

实例化对象名啥都对着呢

写回答 关注

1回答

  • 慕客火星人
    2015-12-17 22:08:44

    奇怪的

JAVA遇见HTML——JSP篇

Java Web入门级教程JSP,带你轻松的学习JSP基础知识

248277 学习 · 3071 问题

查看课程

相似问题