Difference between <jsp:useBean> and <bean:define> ?

From: Anan H. Samiti (anan22_at_hotmail.com)
Date: 09/25/04

  • Next message: Peter Blatt: "How to replace all TABS in a currently opened java source file to BLANKS (Eclipse/Websphere)"
    Date: Sat, 25 Sep 2004 15:01:31 +0200
    
    

    When I define something like the following in my ActionClass (in a Struts/JSP Architecture)

    request.setAttribute("myVo", myVoObject);

    I could access this object from my JSP page (as far as I know) by declaring a bean like:

    <jsp:useBean id="myVo" class="mypackage.myVo" />

    resp.

    <bean:define id="myid" name="myVo" property="getVo" type="mypackage.myVo" />

    But what is the difference?

    Is the next html:text tag valid for both declarations?

    <html:text name="myidValue" property="myValue" size="10" value="<%= myVo.getMyValue() %>" />

    Anan


  • Next message: Peter Blatt: "How to replace all TABS in a currently opened java source file to BLANKS (Eclipse/Websphere)"