Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

usebean and scope

 
Rodrigo W Bonatto
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I'm having problems with the following tag:

<jsp:useBean id="model" class="beanPackage.BeerExpert" scope="application">
<jsp:setProperty name="model" property="name" value="new value" />
</jsp:useBean>

when I try to get the property value of model bean using EL as follow:

Name: [${applicationScope["model"].name}]

I have the follow result:

Name: []

What am I doing wrong?

Thanks in advanced.

Rodrigo
 
Nitish Bahadur
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Assuming you are using a Web Container that implements JSP 2.0 spec such as Tomcat, try putting this on top of your page:

<%@ page isELIgnored="false" %>

What do you see now?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic