This week's book giveaway is in the JavaFX forum.
We're giving away four copies of Introducing JavaFX 8 Programming and have Herbert Schildt on-line!
See this thread for details.
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes usebean and scope Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Introducing JavaFX 8 Programming this week in the JavaFX forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "usebean and scope" Watch "usebean and scope" New topic

usebean and scope

Rodrigo W Bonatto
Ranch Hand

Joined: Aug 20, 2004
Posts: 62

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" />

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.


Nitish Bahadur
Ranch Hand

Joined: Aug 25, 2003
Posts: 118
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?
I agree. Here's the link:
subject: usebean and scope
It's not a secret anymore!