aspose file tools*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes What is the use of jsp:useBean tag ?. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "What is the use of jsp:useBean tag ?." Watch "What is the use of jsp:useBean tag ?." New topic
Author

What is the use of jsp:useBean tag ?.

Praveen Kumar
Ranch Hand

Joined: Nov 06, 2006
Posts: 133
Could you please tell me what is the main purpose of <jsp:useBean> tag in the JSP page.
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

Here are some I can think of
  • Creating a new scoped attribute
  • Retrieving an existing scoped attribute
  • Setting request parameters values in a bean in one shot (jsp:setProperty with property="*")
  • Accessing bean properties (jsp:getProperty,jsp:setProperty)


  • [My Blog]
    All roads lead to JavaRanch
    Praveen Kumar
    Ranch Hand

    Joined: Nov 06, 2006
    Posts: 133
    Christophe Verre ,

    Thanks for reply.

    I think we can create/get/alter scope attributes of type java beans.
    We can get/set the properties of java beans at run time.
    where as page import directive gets the imported classes at
    translation time.
    Seetharaman Venkatasamy
    Ranch Hand

    Joined: Jan 28, 2008
    Posts: 5575

    also to discourage the scripting
    Christophe Verré
    Sheriff

    Joined: Nov 24, 2005
    Posts: 14687
        
      16

    also to discourage the scripting

    Yes, that's a good point. Forget about scripting in your JSP.
    Praveen Kumar
    Ranch Hand

    Joined: Nov 06, 2006
    Posts: 133
    Yes. This standard actions to get rid of the scripting the JSP pages.

    Thanks for replies.

    Please send if you any other reasons !!
     
    With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
     
    subject: What is the use of jsp:useBean tag ?.