问答详情
源自:5-8 JavaBean四个作用域范围

怎么回事?

    

<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

实例化对象名啥都对着呢

提问者:努力GOGO 2015-11-29 22:50

个回答

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

    奇怪的