• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

Objectives 10.3 WHAT WE HAVE TO DO HERE

 
Ranch Hand
Posts: 110
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
10.3 Identify techniques that access a declared JavaBean component.
The Answer From the Notes is :-
A declared JavaBean can also be accessed using: (the name specified in the id attribute of <jsp:useBean>
. Scriptlets
. Expressions
. Custom Tags
But i couldn't understand if Someone plz tell me.
 
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Pls. refer to JSP 1.2 spec page 70 , Semantics of jsp:useBean actions
 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
On my test, I received a bunch of questions in this area, plus it was one of the two areas I did the worst. So read the specs, like posted above, and try it out in real code. Try all the different ways to use the usebean. I think you will find it very helpful. I wish I could help more, but I still need more work in this area myself
Mark
 
Ranch Hand
Posts: 1055
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
A scriptlet is Java code enclosed within <% %> tags. An expression is similar to a scriptlet, except the expression inside its <%= %> tags must return a value. A custom tag is a user-defined tag. Its functionality is defined by a Java class known as a tag handler class.
Your JavaBean (or is it JavaBean(tm)? ) reference is treated just like any other object reference within the tags. You can invoke methods on it, whatever. For example:
<jsp:useBean id="myBean" class="SomeBeanClass" />
<% for (int i=0; i<myBean.getSomeValue(); i++) {
myBean.doesOtherStuff();
} %>
Total bean value: <%= myBean.getTotalValue() %>
<!--etc-->
regards,
Anthony
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
From the spec JSP 2.0 (page 1-99)

"A jsp:useBean action associates an instance of a Java programming language
object
defined within a given scope and available with a given id with a newly
declared scripting variable of the same id."

It helps clear the concept!!!
 
Sheriff
Posts: 67752
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Denis Duan, please avoid posting to 6-year old posts. Please read this for more information.
 
I suggest huckleberry pie. But the only thing on the gluten free menu is this tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic