• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Jsp standard action tag (usebean)

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,


I could not understand the jsp use bean tag

<jsp:usebean id="x" Class= "com.code.Employee" Scope=" request">

what does dis tag exactly do ?? i was confused wid the id attribute wat does the id attribute is used for?


 
Sheriff
Posts: 67746
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
The <jsp:useBean> tag (not usebean, case counts) hooks up a scoped variable to a scripting variable. Because scriptlets have been discredited for 10 years now as they were replaced with the JSTL and EL in JSP 2, this tag is used a lot less than it used to be.

There are some arrangements where this tag may cause the scoped variable to be created if it does not already exist, and this side effect is the only really useful part of the the tag when used in modern script-less pages.

P.S. The id attribute names the scoped variable to be targeted and the scripting variable to be created.
 
chaitanya sri
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you that was helpful. Sorry about that i was new to form thanks for the information.
reply
    Bookmark Topic Watch Topic
  • New Topic