Forums Register Login

What is the use of jsp:useBean tag ?.

+Pie Number of slices to send: Send
Could you please tell me what is the main purpose of <jsp:useBean> tag in the JSP page.
+Pie Number of slices to send: Send
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)

  • +Pie Number of slices to send: Send
    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.
    +Pie Number of slices to send: Send
    also to discourage the scripting
    +Pie Number of slices to send: Send
     

    also to discourage the scripting


    Yes, that's a good point. Forget about scripting in your JSP.
    +Pie Number of slices to send: Send
    Yes. This standard actions to get rid of the scripting the JSP pages.

    Thanks for replies.

    Please send if you any other reasons !!
    it's a teeny, tiny, wafer thin ad:
    a bit of art, as a gift, the permaculture playing cards
    https://gardener-gift.com


    reply
    reply
    This thread has been viewed 1636 times.
    Similar Threads
    Regarding JavaBean in JSP
    Usage of type and class attribute in jsp:useBean
    jsp:useBean
    javaBeans
    jsp:useBean similar tag in spring
    More...

    All times above are in ranch (not your local) time.
    The current ranch time is
    Mar 28, 2024 15:42:25.